DummyBooleanSBool implements SBool { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DummyBooleanSBool that = (DummyBooleanSBool) o; return value == that.value; } DummyBooleanSBool(boolean value); Boolean getValue(); @Override String toString(); @Override SBool out(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testEquals() throws Exception { DummyBooleanSBool value1 = new DummyBooleanSBool(true); DummyBooleanSBool value2 = new DummyBooleanSBool(true); DummyBooleanSBool value3 = new DummyBooleanSBool(false); Assert.assertThat(value1, Is.is(value2)); Assert.assertThat(value1, IsNot.not(value3)); Assert.assertThat(value1, Is.is(value1)); Assert.assertThat(value1, IsNot.not((DummyArithmeticSInt) null)); Assert.assertThat(value1, IsNot.not("42")); }