@Test public void testCopy() { PingPong p1 = new PingPong(new PingPong.PingPongParameters()); PingPong p2 = p1.copy(); p1.init(); p1.network().runMs(200); p2.init(); p2.network().runMs(200); for (PingPong.PingPongNode n1 : p1.network().allNodes) { PingPong.PingPongNode n2 = p2.network().getNodeById(n1.nodeId); Assert.assertNotNull(n2); Assert.assertEquals(n1.pong, n2.pong); } }
@Override public PingPong copy() { return new PingPong(params); }
PingPong implements Protocol { @Override public PingPong copy() { return new PingPong(params); } }
PingPong implements Protocol { @Override public PingPong copy() { return new PingPong(params); } PingPong(PingPongParameters params); }
PingPong implements Protocol { @Override public PingPong copy() { return new PingPong(params); } PingPong(PingPongParameters params); @Override PingPong copy(); @Override void init(); @Override Network<PingPongNode> network(); static void main(String... args); }
PingPong implements Protocol { @Override public PingPong copy() { return new PingPong(params); } PingPong(PingPongParameters params); @Override PingPong copy(); @Override void init(); @Override Network<PingPongNode> network(); static void main(String... args);  }