### Question:
FileWMSEnvoy extends AbstractEnvoy { protected URL getImageURL(LevelRowCol coords) throws MalformedURLException { StringBuilder pathname = new StringBuilder(getBaseDir()); pathname.append(File.separator).append(coords.getLevel()).append(File.separator).append(coords.getRow()) .append(File.separator).append(coords.getRow()).append('_').append(coords.getCol()).append(getFileExtension()); return new File(pathname.toString()).toURI().toURL(); } FileWMSEnvoy(Toolbox toolbox, String baseDir, String fileExtension); protected  FileWMSEnvoy(Toolbox toolbox); @Override void open(); @Override void setFilter(Object filter);  }### Answer:
@Test public void testGetPathToImage() throws MalformedURLException { LevelRowCol coords = new LevelRowCol(1, 5, 10); String path = "/path"; String ext = ".extension"; String pathToImage = new FileWMSEnvoy(null, path, ext).getImageURL(coords).toString(); String expected = path + "/1/5/5_10" + ext; assertTrue(pathToImage + " does not end with " + expected, pathToImage.endsWith(expected)); }