### Question:
ValidationResult { public void assertOk() { if (hasErrors()) { throw new MrrtReportTemplateValidationException(this); } } ValidationResult(); List<ValidationError> getErrors(); void addError(String description, String messageCode); void addError(ValidationError validationError); void assertOk(); boolean hasErrors(); @Override String toString();  }### Answer:
@Test public void shouldFailIfValidationHasErrors() throws Exception { expectedException.expect(MrrtReportTemplateValidationException.class); validationResultWithErrors.assertOk(); }
@Test public void shouldNotFailIfValidationHasErrors() throws Exception { validationResultWithoutErrors.assertOk(); }