### Question:
Configuration implements Iterable<PeerId>, Copiable<Configuration> { public void diff(final Configuration rhs, final Configuration included, final Configuration excluded) { included.peers = new ArrayList<>(this.peers); included.peers.removeAll(rhs.peers); excluded.peers = new ArrayList<>(rhs.peers); excluded.peers.removeAll(this.peers); } Configuration();  Configuration(final Iterable<PeerId> conf);  Configuration(final Configuration conf);  Configuration(final Iterable<PeerId> conf, final Iterable<PeerId> learners); void setLearners(final LinkedHashSet<PeerId> learners); boolean addLearner(final PeerId learner); int addLearners(final Iterable<PeerId> learners); boolean removeLearner(final PeerId learner); LinkedHashSet<PeerId> getLearners(); List<PeerId> listLearners(); @Override Configuration copy(); boolean isValid(); void reset(); boolean isEmpty(); int size(); @Override Iterator<PeerId> iterator(); Set<PeerId> getPeerSet(); List<PeerId> listPeers(); List<PeerId> getPeers(); void setPeers(final List<PeerId> peers); void appendPeers(final Collection<PeerId> set); boolean addPeer(final PeerId peer); boolean removePeer(final PeerId peer); boolean contains(final PeerId peer); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); boolean parse(final String conf); void diff(final Configuration rhs, final Configuration included, final Configuration excluded);  }### Answer:
@Test public void testDiff() { final Configuration conf1 = JRaftUtils.getConfiguration("localhost:8081,localhost:8082,localhost:8083"); final Configuration conf2 = JRaftUtils .getConfiguration("localhost:8081,localhost:8083,localhost:8085,localhost:8086"); final Configuration included = new Configuration(); final Configuration excluded = new Configuration(); conf1.diff(conf2, included, excluded); assertEquals("localhost:8082", included.toString()); assertEquals("localhost:8085,localhost:8086", excluded.toString()); }