diff --git a/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java b/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java index c7ddbc5442e6247d35ac70e7580cd6f6bad65c3a..6cc46e9d4266aaf4d7bf6ac25a376e4a7453f003 100644 --- a/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java +++ b/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java @@ -10,6 +10,7 @@ import java.awt.geom.Point2D; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; import org.junit.After; import org.junit.Before; @@ -321,15 +322,22 @@ public class CopyCommandTest extends CommandTestFunctions { Model model = new ModelFullIndexed(null); model.setNotes("Some description"); - GenericProtein alias = new GenericProtein("a_id"); - alias.setName("ad"); - model.addElement(alias); + GenericProtein protein = new GenericProtein("a_id"); + protein.setName("ad"); + model.addElement(protein); Layer layer = new Layer(); layer.setName("layer name"); model.addLayer(layer); - model.addReaction(new Reaction()); + Reaction reaction = new Reaction(); + Product product = new Product(protein); + Reactant reactant = new Reactant(protein); + product.setLine(new PolylineData()); + reactant.setLine(new PolylineData()); + reaction.addProduct(product); + reaction.addReactant(reactant); + model.addReaction(reaction); return model; }