DictRef implements java.io.Serializable, Cloneable { @Override public String toString() { return "DictRef{T=" + this.type + ", R=" + reference + "}"; } DictRef(String type, String dictRef); String getReference(); String getType(); @Override String toString();  }
@Test public void testToString() { DictRef dictRef = new DictRef("bar:foo", "bla"); String description = dictRef.toString(); for (int i = 0; i < description.length(); i++) { Assert.assertTrue(description.charAt(i) != '\n'); Assert.assertTrue(description.charAt(i) != '\r'); } }