SimpleEncodedPair implements EncodedPair { public String toString() { return new ToStringBuilder(this) .append("name", name) .append("value", value) .toString(); } SimpleEncodedPair(String name, String value); String getName(); String getValue(); String toString();  }
@Test public void toStringShouldReturnUsefulInformations(){ assertEquals("SimpleEncodedPair[name=a,value=b]", toTest.toString()); }