RestrictedMethodAuthorizer implements MethodInvocationAuthorizer { Set<String> getForbiddenMethods() { return forbiddenMethods; } RestrictedMethodAuthorizer(Cache cache); boolean isAllowedGeodeMethod(Method method, Object target); boolean isPermanentlyForbiddenMethod(Method method,
      @SuppressWarnings("unused") Object target); @Override boolean authorize(Method method, Object target); static final String UNAUTHORIZED_STRING; }
@Test public void verifyAuthorizersUsesDefaultForbiddenList() { RestrictedMethodAuthorizer authorizer1 = new RestrictedMethodAuthorizer(mockCache); RestrictedMethodAuthorizer authorizer2 = new RestrictedMethodAuthorizer(mockCache); assertThat(authorizer1.getForbiddenMethods()).isSameAs(authorizer2.getForbiddenMethods()); assertThat(authorizer1.getForbiddenMethods()) .isSameAs(RestrictedMethodAuthorizer.FORBIDDEN_METHODS); assertThat(authorizer2.getForbiddenMethods()) .isSameAs(RestrictedMethodAuthorizer.FORBIDDEN_METHODS); }