SinFunction implements Function<Double> { @Override public Set<String> validateInput(List<Object> args) { return oneOf( args, argsCount(1), isNumber(0) ); }  @Override Set<String> validateInput(List<Object> args); @Override Class<Double> getReturnType(); @Override FunctionName getName(); @Override Double 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(Collections.singletonList("nan")), is(not(empty()))); assertThat(function.validateInput(Collections.singletonList(1)), is(empty())); }