DummyBooleanSBool implements SBool { @Override public String toString() { return "DummyBooleanSBool [value=" + value + "]"; } DummyBooleanSBool(boolean value); Boolean getValue(); @Override String toString(); @Override SBool out(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testToString() throws Exception { DummyBooleanSBool value = new DummyBooleanSBool(true); String toString = value.toString(); Assert.assertThat(toString, StringContains.containsString("true")); Assert.assertThat(value.toString(), Is.is(toString)); }