UserFunctionExecution implements InternalFunction<Object[]> { String[] parseArguments(String argumentsString) { if (argumentsString != null && argumentsString.length() > 0) { return argumentsString.split(","); } else { return null; } }  @Override boolean isHA(); @Override String getId(); @Override Collection<ResourcePermission> getRequiredPermissions(String regionName); @Override void execute(FunctionContext<Object[]> context); static final String ID; }
@Test public void parseArgumentsTest() { assertThat(function.parseArguments(null)).isNull(); assertThat(function.parseArguments("")).isNull(); assertThat(function.parseArguments("arg1,arg2")).isNotNull() .isEqualTo(new String[] {"arg1", "arg2"}); }