StringValue extends ValueAdapter { @Override public boolean equals( Object o ) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } StringValue that = (StringValue) o; return Objects.equals( val, that.val ); } StringValue( String val ); @Override boolean isEmpty(); @Override int size(); @Override String asObject(); @Override String asString(); @Override String toString(); @Override Type type(); @Override boolean equals( Object o ); @Override int hashCode();  }
@Test void testEquals() { StringValue firstValue = new StringValue( "Spongebob" ); StringValue secondValue = new StringValue( "Spongebob" ); assertThat( firstValue, equalTo( secondValue ) ); }