### Question:
TextValue extends ScalarValue { public abstract TextValue replace( String find, String replace ); 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 replace() { assertThat( value.apply( "hello" ).replace( "l", "w" ), equalTo( value.apply( "hewwo" ) ) ); assertThat( value.apply( "hello" ).replace( "ell", "ipp" ), equalTo( value.apply( "hippo" ) ) ); assertThat( value.apply( "hello" ).replace( "a", "x" ), equalTo( value.apply( "hello" ) ) ); assertThat( value.apply( "hello" ).replace( "e", "" ), equalTo( value.apply( "hllo" ) ) ); assertThat( value.apply( "" ).replace( "", "⁻" ), equalTo( value.apply( "⁻" ) ) ); }