ReplaceFunction implements Function<String> { @Override public String apply(List<Object> objects) { return String.valueOf(objects.get(0)).replace( String.valueOf(objects.get(1)), String.valueOf(objects.get(2)) ); }  @Override Set<String> validateInput(List<Object> args); @Override Class<String> getReturnType(); @Override FunctionName getName(); @Override String apply(List<Object> objects); @Override String getSignature(); @Override String getDescription();  }
@Test public void apply() throws Exception { assertThat(function.apply(Arrays.asList("one two three two", "two", "four")), equalTo("one four three four")); }