}
@Test
@SuppressWarnings("unchecked")
public void testMethodWithFunctionContextAndResultSender() throws NoSuchMethodException {
FunctionContext functionContext = mock(FunctionContext.class);
ResultSender resultSender = mock(ResultSender.class);
Method method = TestFunction.class.getDeclaredMethod("methodWithFunctionContextAndResultSender",
FunctionContext.class, ResultSender.class);
FunctionArgumentResolver far = new FunctionContextInjectingArgumentResolver(method);
Object[] originalArgs = new Object[]{};
when(functionContext.getArguments()).thenReturn(originalArgs);
when(functionContext.getResultSender()).thenReturn(resultSender);
Object[] args = far.resolveFunctionArguments(functionContext);
assertEquals(2, args.length);
assertSame(functionContext, args[0]);