### Question:
NotEmptyValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); } NotEmptyValidator(ValidationScope scope, String violationMessage); @Override boolean supports(Class<?> clazz); boolean supports(Object object); @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 testValidate() { List<String> stuff = new ArrayList<>(); stuff.add("one"); stuff.add("two"); validator.validate(stuff, validations, "testValidate-1"); assertFalse(validationHelper.hasErrors()); validator.validate(stuff, validations, "testValidate-2", ValidationStatus.WARN); assertFalse(validationHelper.hasErrors()); }
@Test public void testValidateInvalid() { List<String> stuff = new ArrayList<>(); validator.validate(stuff, validations, "testValidateInvalid"); assertTrue(validationHelper.hasErrors()); assertEquals(new Integer(1), new Integer(validationHelper.getCount())); assertEquals(ValidationScope.MAPPING, validationHelper.getValidation().get(0).getScope()); assertEquals("testValidateInvalid", validationHelper.getValidation().get(0).getId()); assertFalse(validationHelper.hasWarnings()); assertFalse(validationHelper.hasInfos()); }