### Question:
TextValue extends ScalarValue { public abstract TextValue reverse(); TextValue(); abstract String stringValue(); abstract int length(); abstract TextValue substring( int start, int length ); TextValue substring( int start ); abstract TextValue trim(); abstract TextValue ltrim(); abstract TextValue rtrim(); abstract TextValue toLower(); abstract TextValue toUpper(); abstract ListValue split( String separator ); abstract TextValue replace( String find, String replace ); abstract TextValue reverse(); abstract TextValue plus( TextValue other ); abstract boolean startsWith( TextValue other ); abstract boolean endsWith( TextValue other ); abstract boolean contains( TextValue other ); abstract int compareTo( TextValue other ); @Override final boolean equals( boolean x ); @Override final boolean equals( long x ); @Override final boolean equals( double x ); @Override ValueGroup valueGroup(); @Override NumberType numberType(); @Override T map( ValueMapper<T> mapper );  }### Answer:
@Test public void reverse() { assertThat( value.apply( "Foo" ).reverse(), equalTo( value.apply( "ooF" ) ) ); assertThat( value.apply( "" ).reverse(), equalTo( StringValue.EMPTY ) ); assertThat( value.apply( " L" ).reverse(), equalTo( value.apply( "L " ) ) ); assertThat( value.apply( "\r\n" ).reverse(), equalTo( value.apply( "\n\r" ) ) ); assertThat( value.apply( "\uD801\uDC37" ).reverse(), equalTo( value.apply( "\uD801\uDC37" ) ) ); assertThat( value.apply( "This is literally a pile of crap \uD83D\uDCA9, it is fantastic" ).reverse(), equalTo( value.apply( "citsatnaf si ti ,\uD83D\uDCA9 parc fo elip a yllaretil si sihT" ) ) ); assertThat( value.apply( "\uD83D\uDE21\uD83D\uDCA9\uD83D\uDC7B" ).reverse(), equalTo( value.apply( "\uD83D\uDC7B\uD83D\uDCA9\uD83D\uDE21" ) ) ); }