JavaBeanAccessorMethodAuthorizer implements MethodInvocationAuthorizer { public Set<String> getAllowedPackages() { return allowedPackages; } JavaBeanAccessorMethodAuthorizer(Cache cache, Set<String> allowedPackages);  JavaBeanAccessorMethodAuthorizer(RestrictedMethodAuthorizer restrictedMethodAuthorizer,
      Set<String> allowedPackages); @Override boolean authorize(Method method, Object target); Set<String> getAllowedPackages();  }
@Test public void allowedPackagesIsUnmodifiable() { assertThatThrownBy( () -> authorizerWithLangAndIOPackagesSpecified.getAllowedPackages().remove(LANG_PACKAGE)) .isInstanceOf(UnsupportedOperationException.class); }