ConvFunction implements Function<String> { @Override public String apply(List<Object> objects) { Integer base1 = Integer.parseInt(String.valueOf(objects.get(1))); Integer base2 = Integer.parseInt(String.valueOf(objects.get(2))); return Integer.toString(Integer.parseInt(String.valueOf(objects.get(0)), base1), base2); }  @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("a", 16, 2)), equalTo("1010")); assertThat(function.apply(Arrays.asList("6E", 18, 8)), equalTo("172")); }