StringValue extends ValueAdapter { public StringValue( String val ) { if ( val == null ) { throw new IllegalArgumentException( "Cannot construct StringValue from null" ); } this.val = 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 testStringValue() { StringValue value = new StringValue( "Spongebob" ); assertThat( value.asString(), equalTo( "Spongebob" ) ); }