### Question:
FunctionMapperSpi { public abstract Method resolveFunction(String localName);  abstract String getPrefixName(); abstract Method resolveFunction(String localName);  }### Answer:
@Test public void shouldResolveAddFunction() throws Exception { FunctionMapperSpi mapper = new FunctionMapperSpi.Reflective(Functions.class) { @Override public String getPrefixName() { return "test"; } }; Method add = mapper.resolveFunction("add"); assertNotNull(add); assertEquals(1 + 2, add.invoke(null, 1, 2)); }
@Test public void shouldResolveAdd3Function() throws Exception { FunctionMapperSpi mapper = new FunctionMapperSpi.Reflective(Functions.class) { @Override public String getPrefixName() { return "test"; } }; Method add3 = mapper.resolveFunction("add3"); assertNotNull(add3); assertEquals(1 + 2 + 3, add3.invoke(null, 1, 2, 3)); }