JoinFunction implements Function<String> { @Override public String apply(List<Object> objects) { String separator = String.valueOf(objects.get(0)); return objects.subList(1, objects.size()).stream() .map(String::valueOf) .collect(Collectors.joining(separator)); }  @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(":", "1")), equalTo("1")); assertThat(function.apply(Arrays.asList(":", "1", "2", "3")), equalTo("1:2:3")); }