@Test
public void testLogS3GuardDisabled() throws Exception {

  final Logger localLogger = LoggerFactory.getLogger(
      TestS3Guard.class.toString() + UUID.randomUUID());
  S3Guard.logS3GuardDisabled(localLogger,
      S3Guard.DisabledWarnLevel.SILENT.toString(), "bucket");
  S3Guard.logS3GuardDisabled(localLogger,
      S3Guard.DisabledWarnLevel.INFORM.toString(), "bucket");
  S3Guard.logS3GuardDisabled(localLogger,
      S3Guard.DisabledWarnLevel.WARN.toString(), "bucket");
  // Test that lowercase setting is accepted
  S3Guard.logS3GuardDisabled(localLogger,
      S3Guard.DisabledWarnLevel.WARN.toString()
          .toLowerCase(Locale.US), "bucket");
  ExitUtil.ExitException ex = LambdaTestUtils.intercept(
      ExitUtil.ExitException.class,
      String.format(S3Guard.DISABLED_LOG_MSG, "bucket"),
      () -> S3Guard.logS3GuardDisabled(
          localLogger, S3Guard.DisabledWarnLevel.FAIL.toString(), "bucket"));
  if (ex.getExitCode() != LauncherExitCodes.EXIT_BAD_CONFIGURATION) {
    throw ex;
  }
  LambdaTestUtils.intercept(IllegalArgumentException.class,
      S3Guard.UNKNOWN_WARN_LEVEL,
      () -> S3Guard.logS3GuardDisabled(
          localLogger, "FOO_BAR_LEVEL", "bucket"));
}