@Test public void testParseDropLegacyValueInvalid() { assertThatExceptionOfType(InvalidRequestException.class) .isThrownBy(() -> contract.verifyValidDropValue("NOT")); }
void verifyValidDropValue(String value) { if (!DROP_LEGACY_VALUE_PATTERN.equals(value.toLowerCase())) { throw new InvalidRequestException(String.format("Legacy audit whitelist data will only be dropped if value is set to [%s]", DROP_LEGACY_VALUE_PATTERN)); } }
WhitelistContract { void verifyValidDropValue(String value) { if (!DROP_LEGACY_VALUE_PATTERN.equals(value.toLowerCase())) { throw new InvalidRequestException(String.format("Legacy audit whitelist data will only be dropped if value is set to [%s]", DROP_LEGACY_VALUE_PATTERN)); } } }
WhitelistContract { void verifyValidDropValue(String value) { if (!DROP_LEGACY_VALUE_PATTERN.equals(value.toLowerCase())) { throw new InvalidRequestException(String.format("Legacy audit whitelist data will only be dropped if value is set to [%s]", DROP_LEGACY_VALUE_PATTERN)); } }  }
WhitelistContract { void verifyValidDropValue(String value) { if (!DROP_LEGACY_VALUE_PATTERN.equals(value.toLowerCase())) { throw new InvalidRequestException(String.format("Legacy audit whitelist data will only be dropped if value is set to [%s]", DROP_LEGACY_VALUE_PATTERN)); } }   }
WhitelistContract { void verifyValidDropValue(String value) { if (!DROP_LEGACY_VALUE_PATTERN.equals(value.toLowerCase())) { throw new InvalidRequestException(String.format("Legacy audit whitelist data will only be dropped if value is set to [%s]", DROP_LEGACY_VALUE_PATTERN)); } }    }