BitLengthFunction implements Function<Integer> { @Override public Integer apply(List<Object> objects) { return String.valueOf(objects.get(0)).getBytes().length * 8; }  @Override Set<String> validateInput(List<Object> args); @Override Class<Integer> getReturnType(); @Override FunctionName getName(); @Override Integer apply(List<Object> objects); @Override String getSignature(); @Override String getDescription();  }
@Test public void apply() throws Exception { assertThat(function.apply(Collections.singletonList("text")), equalTo(32)); }