@Test
public void testReplay() {
AbstractGraph g1 = new AdjacencyListGraph("g1");
Graph g2 = new AdjacencyListGraph("g2");
Node A1 = g1.addNode("A");
Node B1 = g1.addNode("B");
Node C1 = g1.addNode("C");
Edge AB1 = g1.addEdge("AB", "A", "B");
Edge BC1 = g1.addEdge("BC", "B", "C");
Edge CA1 = g1.addEdge("CA", "C", "A");
A1.addAttribute("string", "an example");
B1.addAttribute("double", 42.0);
C1.addAttribute("array", new int[] { 1, 2, 3 });
AB1.addAttribute("string", "an example");
BC1.addAttribute("double", 42.0);
CA1.addAttribute("array", new int[] { 1, 2, 3 });
Replayable.Controller controller = g1.getReplayController();
controller.addSink(g2);
controller.replay();
Node A2 = g2.getNode("A");
Node B2 = g2.getNode("B");
Node C2 = g2.getNode("C");
assertNotNull(A2);
assertNotNull(B2);
assertNotNull(C2);