private void assertNotAuthorized(ResourcePermission context) {
    assertThatThrownBy(() -> securityService.authorize(context))
        .isInstanceOf(GemFireSecurityException.class).hasMessageContaining(context.toString());
  }
Integration tests for SecurityService using shiro.ini
geode-core/src/integrationTest/java/org/apache/geode/management/internal/security/SecurityServiceWithShiroIniIntegrationTest.java