@Test public void testWhitelistAtCreateIsRejected() { RoleOptions options = createRoleOptions( Collections.singletonMap("grant_audit_whitelist_for_select", "data")); assertThatExceptionOfType(InvalidRequestException.class) .isThrownBy(() -> whitelistManager.createRoleOption(options)); }
void createRoleOption(RoleOptions options) { if (options.getCustomOptions().isPresent()) { throw new InvalidRequestException("Whitelist options are not supported in CREATE ROLE statements"); } }
AuditWhitelistManager { void createRoleOption(RoleOptions options) { if (options.getCustomOptions().isPresent()) { throw new InvalidRequestException("Whitelist options are not supported in CREATE ROLE statements"); } } }
AuditWhitelistManager { void createRoleOption(RoleOptions options) { if (options.getCustomOptions().isPresent()) { throw new InvalidRequestException("Whitelist options are not supported in CREATE ROLE statements"); } } AuditWhitelistManager(); @VisibleForTesting  AuditWhitelistManager(WhitelistDataAccess whitelistDataAccess); }
AuditWhitelistManager { void createRoleOption(RoleOptions options) { if (options.getCustomOptions().isPresent()) { throw new InvalidRequestException("Whitelist options are not supported in CREATE ROLE statements"); } } AuditWhitelistManager(); @VisibleForTesting  AuditWhitelistManager(WhitelistDataAccess whitelistDataAccess); void setup(); }
AuditWhitelistManager { void createRoleOption(RoleOptions options) { if (options.getCustomOptions().isPresent()) { throw new InvalidRequestException("Whitelist options are not supported in CREATE ROLE statements"); } } AuditWhitelistManager(); @VisibleForTesting  AuditWhitelistManager(WhitelistDataAccess whitelistDataAccess); void setup();  }