EqualsIgnoreCaseValidationMatcher implements ValidationMatcher { public void validate(String fieldName, String value, List<String> controlParameters, TestContext context) throws ValidationException { String control = controlParameters.get(0); if (!value.equalsIgnoreCase(control)) { throw new ValidationException(this.getClass().getSimpleName() + " failed for field '" + fieldName + "'. Received value is '" + value + "', control value is '" + control + "'."); } }  void validate(String fieldName, String value, List<String> controlParameters, TestContext context);  }
@Test public void testValidateSuccess() { matcher.validate("field", "VALUE", Arrays.asList("value"), context); matcher.validate("field", "VALUE", Arrays.asList("VALUE"), context); matcher.validate("field", "value", Arrays.asList("VALUE"), context); matcher.validate("field", "value", Arrays.asList("value"), context); matcher.validate("field", "$%& value 123", Arrays.asList("$%& VALUE 123"), context); matcher.validate("field", "/() VALUE @&§", Arrays.asList("/() VALUE @&§"), context); }