### Question:
StringPatternValidator implements AtlasValidator { @Override public boolean supports(Class<?> clazz) { return String.class.isAssignableFrom(clazz); } StringPatternValidator(ValidationScope scope, String violationMessage, String pattern);  StringPatternValidator(ValidationScope scope, String violationMessage, String pattern, boolean useMatch); @Override boolean supports(Class<?> clazz); @Override void validate(Object target, List<Validation> validations, String id); @Override void validate(Object target, List<Validation> validations, String id, ValidationStatus status);  }### Answer:
@Test public void testSupported() { validator = new StringPatternValidator(ValidationScope.ALL, "Must match .*", ".*"); assertTrue(validator.supports(String.class)); }
@Test public void testUnsupported() { validator = new StringPatternValidator(ValidationScope.DATA_SOURCE, "Must match [0-9_.]", "[0-9_.]"); assertFalse(validator.supports(Double.class)); }