JsCacheRemoveInterceptor implements Serializable { @AroundInvoke public Object processJsCacheRemove(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()); JsCacheRemove jcr = method.getAnnotation(JsCacheRemove.class); jsCacheAnnotationServices.processJsCacheRemove(jcr, paramNames, jsonArgs); return ctx.proceed(); }  @AroundInvoke Object processJsCacheRemove(InvocationContext ctx);  }
@Test public void testProcessJsCacheRemove() throws Exception { System.out.println("processJsCacheRemove"); InvocationContext ctx = mock(InvocationContext.class); Method method = CacheAnnotedClass.class.getDeclaredMethod("jsCacheRemoveAnnotatedMethodWithAllArgs", Integer.TYPE, String.class); when(ctx.getMethod()).thenReturn(method); instance.processJsCacheRemove(ctx); verify(jsCacheAnnotationServices).processJsCacheRemove(any(JsCacheRemove.class), anyList(), anyList()); verify(ctx).proceed(); }