### Question:
StorageClassValidator implements IParameterValidator { @Override public void validate(String name, String value) throws ParameterException { try { AwsUtil.toStorageClass(value); } catch (IllegalArgumentException e) { throw new ParameterException("Parameter " + name + " is not a valid AWS S3 storage class (found " + value + ")", e); } }  @Override void validate(String name, String value);  }### Answer:
@Test public void typical() { validator.validate("storageClass", "standard"); validator.validate("storageClass", "STANDARD"); validator.validate("storageClass", "STaNDaRD"); }
@Test public void nullValue() { validator.validate("storageClass", null); }
@Test(expected = ParameterException.class) public void invalid() { validator.validate("storageClass", "REDUCEDREDUNDANCY"); }