### Question:
DestinationValidator { public void validate(String destination) { if(destination == null) throw new SamlValidationException(destinationMissing(expectedUri)); URI destinationURI = URI.create(destination); URI destinationURIWithoutPort; destinationURIWithoutPort = uriWithoutPort(destinationURI, destinationURI.getPath()); if (!expectedUri.equals(destinationURIWithoutPort)) throw new SamlValidationException(destinationEmpty(expectedUri, destination)); } DestinationValidator(URI expectedDestinationHost, String expectedEndpoint); void validate(String destination);  }### Answer:
@Test public void validate_shouldNotThrowExceptionIfUriMatches() throws Exception { validator.validate("http: }
@Test public void validate_shouldBeValidIfPortSpecifiedOnDestinationButNotForSamlProxy() throws Exception { validator.validate("http: }