DefaultDataFunctionRegistry implements DataFunctionRegistry { @Override public DataFunction<?> getFunction(String name) { if (!functions.containsKey(name)) { log.error("No function could be found with name " + name); throw new FunctionNotFoundException(name); } return functions.get(name); } DefaultDataFunctionRegistry();  DefaultDataFunctionRegistry(boolean registerDefaults); @Override void register(String name, DataFunction<?> function); @Override DataFunction<?> getFunction(String name); @Override Set<String> getFunctions();  }
@Test(expectedExceptions = FunctionNotFoundException.class) public void testNonExistentFunction() { final DefaultDataFunctionRegistry registry = new DefaultDataFunctionRegistry(); registry.getFunction("xyz"); }