CharFunction implements Function<String> { @Override public Set<String> validateInput(List<Object> args) { List<java.util.function.Function<List<Object>, Set<String>>> conditions = new ArrayList<>(); conditions.add(argsCount(GREATER_THAN_EQUAL, 1)); for (int i = 0; i <= args.size() - 1; i++) { conditions.add(isInteger(i)); } @SuppressWarnings("unchecked") java.util.function.Function<List<Object>, Set<String>>[] conditionsArr = conditions.toArray(new java.util.function.Function[args.size()]); return oneOf( args, conditionsArr ); }  @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(Collections.singletonList(1)), is(empty())); }