UriEndpointMapping extends AbstractMapBasedEndpointMapping { @Override protected boolean validateLookupKey(String key) { try { new URI(key); return true; } catch (URISyntaxException e) { return false; } }  void setUsePath(boolean usePath);  }
@Test public void testValidateLookupKey() throws Exception { Assert.assertTrue("URI not valid", mapping.validateLookupKey("http: Assert.assertFalse("URI not valid", mapping.validateLookupKey("some string")); }