MethodInvokerDecorator implements MethodInvoker { @Override public Object invokeMethod(Object resource, GenericResourceMethod genericResourceMethod, ApplicationContext context) { return decoratedInvoker.invokeMethod(resource, genericResourceMethod, context); } MethodInvokerDecorator(MethodInvoker decoratedInvoker); @Override Object invokeMethod(Object resource, GenericResourceMethod genericResourceMethod, ApplicationContext context);  }
@Test public void delegatesCallToMethodInvoker() throws Exception { Object object = new Object(); GenericResourceMethod method = mock(GenericResourceMethod.class); ApplicationContext applicationContext = mock(ApplicationContext.class); decorator.invokeMethod(object, method, applicationContext); verify(methodInvoker).invokeMethod(object, method, applicationContext); }