### Question:
ENRGossiping implements Protocol { @Override public ENRGossiping copy() { return new ENRGossiping(params); } ENRGossiping(ENRParameters params); @Override Network<ETHNode> network(); @Override ENRGossiping copy(); @Override void init(); @Override String toString(); static void main(String... args); final P2PNetwork<ETHNode> network; }### Answer:
@Test public void testCopy() { String nb = RegistryNodeBuilders.name(RegistryNodeBuilders.Location.RANDOM, true, 0); String nl = NetworkLatency.NetworkLatencyByDistanceWJitter.class.getSimpleName(); ENRGossiping p1 = new ENRGossiping( new ENRGossiping.ENRParameters(100, 10, 25, 15000, 2, 20, 0.4f, 10, 5, 5, nb, nl)); ENRGossiping p2 = p1.copy(); p1.init(); p1.network().run(10); p2.init(); p2.network().run(10); for (ENRGossiping.ETHNode n1 : p1.network().allNodes) { ENRGossiping.ETHNode n2 = p2.network().getNodeById(n1.nodeId); Assert.assertNotNull(n2); Assert.assertEquals(n1.doneAt, n2.doneAt); Assert.assertEquals(n1.isDown(), n2.isDown()); Assert.assertEquals(n1.getMsgReceived(-1).size(), n2.getMsgReceived(-1).size()); Assert.assertEquals(n1.x, n2.x); Assert.assertEquals(n1.y, n2.y); Assert.assertEquals(n1.peers, n2.peers); } }