SecureInterceptor { @AroundInvoke public Object processSecure(InvocationContext ctx) throws Exception { OcelotSecured ocelotSecured = getOcelotSecuredAnnotation(ctx.getMethod()); checkAccess(ctx, getSecureProviderImpl(ocelotSecured.provider()), ocelotSecured.roles()); return ctx.proceed(); }  @AroundInvoke Object processSecure(InvocationContext ctx);  }
@Test public void testProcessSecure() throws Exception { InvocationContext ctx = getCtx(); doReturn(null).when(instance).checkAccess(eq(ctx), any(MySecureProvider.class), any(String[].class)); when(ctx.proceed()).thenReturn("RESULT"); Object result = instance.processSecure(ctx); assertThat(result).isEqualTo("RESULT"); }