@Test public void testCopy() { P2PHandel p1 = new P2PHandel( new P2PHandel.P2PHandelParameters( 500, 2, 60, 10, 2, 20, false, P2PHandel.SendSigsStrategy.dif, true, nb, nl)); P2PHandel p2 = p1.copy(); p1.init(); p1.network().runMs(500); p2.init(); p2.network().runMs(500); for (P2PHandel.P2PHandelNode n1 : p1.network().allNodes) { P2PHandel.P2PHandelNode n2 = p2.network().getNodeById(n1.nodeId); Assert.assertNotNull(n2); Assert.assertEquals(n1.doneAt, n2.doneAt); Assert.assertEquals(n1.verifiedSignatures, n2.verifiedSignatures); Assert.assertEquals(n1.toVerify, n2.toVerify); } }
@Override public P2PHandel copy() { return new P2PHandel(params); }
P2PHandel implements Protocol { @Override public P2PHandel copy() { return new P2PHandel(params); } }
P2PHandel implements Protocol { @Override public P2PHandel copy() { return new P2PHandel(params); } P2PHandel(P2PHandelParameters params); }
P2PHandel implements Protocol { @Override public P2PHandel copy() { return new P2PHandel(params); } P2PHandel(P2PHandelParameters params); @Override void init(); @Override Network<P2PHandelNode> network(); @Override P2PHandel copy(); }
P2PHandel implements Protocol { @Override public P2PHandel copy() { return new P2PHandel(params); } P2PHandel(P2PHandelParameters params); @Override void init(); @Override Network<P2PHandelNode> network(); @Override P2PHandel copy();  }