### Question:
AssertValidResult { public static <T> void assertValid(ValidationResult result) { assertValid(result,null); }  static void assertValid(ValidationResult result); static void assertValid(ValidationResult result, String errorMessage);  }### Answer:
@Test public void valid_result_no_exception_thrown() { ValidationResult resultOK = new ValidationResult(); assertTrue(resultOK.isValid()); AssertValidResult.assertValid(resultOK); }
@Test public void invalid_result_exception_with_error_description_as_message_thrown() { ValidationResult resultFAILED = new ValidationResult(); resultFAILED.addError("error1"); assertFalse(resultFAILED.isValid()); expected.expectMessage("error1"); AssertValidResult.assertValid(resultFAILED); }