### Question:
ValidationResult { public boolean hasWarnings() { return !warnings.isEmpty(); } private  ValidationResult(); private  ValidationResult(Collection<String> errors, Collection<String> warnings); static ValidationResult success(); static ValidationResult errors(Collection<String> errors); static ValidationResult errors(String... errors); static ValidationResult warnings(Collection<String> warnings); static ValidationResult warnings(String... warnings); static ValidationResult of(ValidationResult... validationResults); Collection<String> getErrors(); Collection<String> getWarnings(); boolean hasErrors(); boolean hasWarnings(); String combineErrorMessages(); String combineWarningMessages();  }### Answer:
@Test public void hasWarningsTest() { ValidationResult warnings = ValidationResult.warnings(WARNING_MESSAGE_1); ValidationResult emptyWarnings = ValidationResult.success(); assertTrue(warnings.hasWarnings()); assertFalse(emptyWarnings.hasErrors()); }