### Question:
URLResource implements Resource { public Resource getRelativeResource(String relativePath) { try { return new URLResource(new URL(url, relativePath)); } catch (MalformedURLException e) { throw new CayenneRuntimeException( "Error creating relative resource '%s' : '%s'", e, url, relativePath); } } URLResource(URL url); Resource getRelativeResource(String relativePath); URL getURL(); @Override String toString();  }### Answer:
@Test public void testGetRelativeResource() throws Exception { URL url = new URL("http: URLResource resource = new URLResource(url); Resource relativeResource = resource.getRelativeResource("/docs"); assertNotNull(relativeResource); assertEquals("http: .getURL() .toExternalForm()); }