### Question:
ProjectWhiteListSupport { public boolean isWhitelisted(String uriAsString, Collection<URI> whitelist) { URI uri; try { uri = new URI(uriAsString); } catch (URISyntaxException e) { throw new NotAcceptableException("Not a valid uri:"+uriAsString); } for (URI accepted: whitelist) { if (isContained(uri, accepted)) { return true; } } return false; }  boolean isWhitelisted(String uriAsString, Collection<URI> whitelist);  }### Answer:
@Test public void when_no_uri_defined_https_google_de__is_not_valid() throws Exception { assertFalse(validationToTest.isWhitelisted("https: }
@Test public void when_uri_https_amazon_com_defined_https_google_de__is_not_valid() throws Exception { assertFalse(validationToTest.isWhitelisted("https: }
@Test public void when_uri_https_www_google_de_defined_https_www_google_de__is_valid() throws Exception { assertTrue(validationToTest.isWhitelisted("https: }
@Test public void when_uri_https_amazon_com_and_https_www_google_de_defined_https_www_google_de__is_not_valid() throws Exception { assertTrue(validationToTest.isWhitelisted("https: }
@Test public void when_uri_https_www_google_de_defined_https_www_google_de_slash_nerdytest__is_valid() throws Exception { assertTrue(validationToTest.isWhitelisted("https: }
@Test public void when_uri_192_168_1_is_defined_https_192_168_1_1_slash_nerdytest__is_valid() throws Exception { assertTrue(validationToTest.isWhitelisted("https: }