BooleanValue extends ValueAdapter { @Override public int hashCode() { Boolean value = asBoolean() ? Boolean.TRUE : Boolean.FALSE; return value.hashCode(); } private  BooleanValue(); static BooleanValue fromBoolean( boolean value ); @Override abstract Boolean asObject(); @Override Type type(); @Override int hashCode(); static BooleanValue TRUE; static BooleanValue FALSE; }
@Test void testHashCode() { BooleanValue value = TRUE; assertThat( value.hashCode(), notNullValue() ); }