### Question:
RegionValidator implements IParameterValidator { @Override public void validate(String name, String value) throws ParameterException { try { Region.fromValue(value); } catch (IllegalArgumentException e) { throw new ParameterException("Parameter " + name + " is not a valid AWS region (found " + value + ")", e); } }  @Override void validate(String name, String value);  }### Answer:
@Test public void typical() { validator.validate("region", "us-west-2"); }
@Test public void nullValue() { validator.validate("region", null); }
@Test(expected = ParameterException.class) public void caseSensitive() { validator.validate("region", "US-WEST-2"); }
@Test(expected = ParameterException.class) public void invalid() { validator.validate("region", "DEFAULT_REGION"); }