ConvFunction implements Function<String> { @Override public Set<String> validateInput(List<Object> args) { return oneOf( args, argsCount(3), isInteger(0, Character.MAX_RADIX), between(1, Character.MIN_RADIX, Character.MAX_RADIX), between(2, Character.MIN_RADIX, Character.MAX_RADIX) ); }  @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 validateInput() throws Exception { assertThat(function.validateInput(Collections.emptyList()), is(not(empty()))); assertThat(function.validateInput(Arrays.asList("32", 1, 16)), is(not(empty()))); assertThat(function.validateInput(Arrays.asList("42", 16, -1)), is(not(empty()))); assertThat(function.validateInput(Arrays.asList("-symbols!", 2, 16)), is(not(empty()))); assertThat(function.validateInput(Arrays.asList("a", 16, 2)), is(empty())); }