### Question:
UrlSource implements Source { @Override public String getLocation() { return url.toString(); } UrlSource( URL url ); @Override InputStream getInputStream(); @Override String getLocation(); URL getUrl(); @Override String toString(); @Override int hashCode(); @Override boolean equals( Object obj );  }### Answer:
@Test public void testGetLocation() throws Exception { URL txtFile = new File( "target/test-classes/source.txt" ).toURI().toURL(); UrlSource source = new UrlSource( txtFile ); assertEquals( txtFile.toExternalForm(), source.getLocation() ); }