NetworkConfigurationImpl implements NetworkConfiguration { @Override public String toString() { return "NetworkConfigurationImpl [myId=" + myId + ", parties=" + parties + "]"; } NetworkConfigurationImpl(int myId, Map<Integer, Party> parties); @Override Party getParty(int id); @Override int getMyId(); @Override Party getMe(); @Override int noOfParties(); @Override String toString();  }
@Test public void testToString() { String s = netConf.toString(); assertTrue(s.startsWith("NetworkConfigurationImpl")); assertTrue(s.contains("myId=" + me.getPartyId())); for (int i = 1; i < netConf.noOfParties() + 1; i++) { assertTrue(s.contains(netConf.getParty(i).toString())); } }