BooleanDifference implements IDifference { @Override public String toString() { return name + ":" + (first == null ? "NA" : (first ? "T" : "F")) + "/" + (second == null ? "NA" : (second ? "T" : "F")); } private  BooleanDifference(String name, Boolean first, Boolean second); static IDifference construct(String name, Boolean first, Boolean second); @Override String toString();  }
@Test public void testToString() { IDifference result = BooleanDifference.construct("Foo", true, false); String diffString = result.toString(); Assert.assertNotNull(diffString); assertOneLiner(diffString); }