@Override
    public Configuration copy() {
        return new Configuration(this.peers, this.learners);
    }
@Test
    public void testCopy() {
        final Configuration conf = JRaftUtils.getConfiguration("localhost:8081,localhost:8082,localhost:8083");
        final Configuration copied = conf.copy();
        assertEquals(conf, copied);
        assertNotSame(conf, copied);
        assertEquals(copied.size(), 3);
        assertEquals("localhost:8081,localhost:8082,localhost:8083", copied.toString());

        final PeerId newPeer = new PeerId("localhost", 8084);
        conf.addPeer(newPeer);
        assertEquals(copied.size(), 3);
        assertEquals(conf.size(), 4);
        assertTrue(conf.contains(newPeer));
        assertFalse(copied.contains(newPeer));
    }