### Question:
URIValidationImpl extends AbstractValidation<URI> implements URIValidation { @Override protected void validate(ValidationContext<URI> context) { validateNotNull(context); URI uri = context.objectToValidate; if (uri == null) { return; } String simpleString = uri.toString().trim(); if (simpleString.isEmpty()) { addErrorMessage(context, "May not be empty!"); return; } }    }### Answer:
@Test public void null_not_allowed() { URI uri = null; ValidationResult result = validationToTest.validate(uri); assertFalse(result.isValid()); }
@Test public void empty_URI_not_allowed() throws Exception { URI uri = new URI(""); ValidationResult result = validationToTest.validate(uri); assertFalse(result.isValid()); }
@Test public void http_www_google_de_is_allowed() throws Exception { URI uri = new URI("http: ValidationResult result = validationToTest.validate(uri); assertTrue(result.isValid()); }
@Test public void https_www_google_de_is_allowed() throws Exception { URI uri = new URI("https: ValidationResult result = validationToTest.validate(uri); assertTrue(result.isValid()); }
@Test public void ip_192_168_178_24_is_allowed() throws Exception { URI uri = new URI("192.168.178.24"); ValidationResult result = validationToTest.validate(uri); assertTrue(result.isValid()); }
@Test public void ip_192_168_178_24_slash_test_is_allowed() throws Exception { URI uri = new URI("192.168.178.24/test"); ValidationResult result = validationToTest.validate(uri); assertTrue(result.isValid()); }