ValidationResult { public boolean isSuccessful() { return !hasErrors() && !hasErrorKeys(); } ValidationResult(); List<ValidationError> getErrors(); void addError(ValidationError error); void addError(String resourceKey); List<RulesValidationError> getErrorKeys(); void addError(RulesValidationError errorKey); List<ValidationWarning> getWarnings(); void addWarning(ValidationWarning warning); void addWarning(String resourceKey); void add(ValidationResult result); boolean hasErrors(); boolean hasErrorKeys(); boolean hasWarnings(); boolean isSuccessful();  }
@Test public void isSuccessful() { assertTrue(vr.isSuccessful()); vr.addError("unsuccessful"); assertFalse(vr.isSuccessful()); }