RestrictedMethodAuthorizer implements MethodInvocationAuthorizer { Map<String, Set<Class>> getAllowedGeodeMethodsPerClass() { return allowedGeodeMethodsPerClass; } 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 verifyAuthorizersUsesGeodeAllowedList() { RestrictedMethodAuthorizer authorizer1 = new RestrictedMethodAuthorizer(mockCache); RestrictedMethodAuthorizer authorizer2 = new RestrictedMethodAuthorizer(mockCache); assertThat(authorizer1.getAllowedGeodeMethodsPerClass()) .isSameAs(authorizer2.getAllowedGeodeMethodsPerClass()); assertThat(authorizer1.getAllowedGeodeMethodsPerClass()) .isSameAs(RestrictedMethodAuthorizer.GEODE_ALLOWED_METHODS); assertThat(authorizer2.getAllowedGeodeMethodsPerClass()) .isSameAs(RestrictedMethodAuthorizer.GEODE_ALLOWED_METHODS); }