JsCacheRemovesInterceptor implements Serializable { @AroundInvoke public Object processJsCacheRemoves(InvocationContext ctx) throws Exception { Method method = ctx.getMethod(); List<String> jsonArgs = argumentServices.getJsonParameters(ctx.getParameters(), method.getParameterAnnotations()); List<String> paramNames = cacheParamNameServices.getMethodParamNames(method.getDeclaringClass(), method.getName()); JsCacheRemoves jcrs = method.getAnnotation(JsCacheRemoves.class); for (JsCacheRemove jcr : jcrs.value()) { jsCacheAnnotationServices.processJsCacheRemove(jcr, paramNames, jsonArgs); } return ctx.proceed(); }  @AroundInvoke Object processJsCacheRemoves(InvocationContext ctx);  }
@Test public void testProcessJsCacheRemoves() throws Exception { System.out.println("processJsCacheRemoves"); InvocationContext ctx = mock(InvocationContext.class); Method method = CacheAnnotedClass.class.getDeclaredMethod("jsCacheRemovesAnnotatedMethod", Integer.TYPE, CacheManagerTest.Result.class); when(ctx.getMethod()).thenReturn(method); instance.processJsCacheRemoves(ctx); verify(jsCacheAnnotationServices, times(2)).processJsCacheRemove(any(JsCacheRemove.class), anyList(), anyList()); verify(ctx).proceed(); }