### Question:
GMTEDProvider extends AbstractTiffElevationProvider { String getFileName(double lat, double lon) { int lonInt = getMinLonForTile(lon); int latInt = getMinLatForTile(lat); return toLowerCase(getLatString(latInt) + getNorthString(latInt) + getLonString(lonInt) + getEastString(lonInt) + FILE_NAME_END); } GMTEDProvider();  GMTEDProvider(String cacheDir); static void main(String[] args); @Override String toString();  }### Answer:
@Test public void testGetFileName() { assertEquals("30n000e_20101117_gmted_mea075", instance.getFileName(42.940339, 11.953125)); assertEquals("30n090w_20101117_gmted_mea075", instance.getFileName(38.548165, -77.167969)); assertEquals("70n180w_20101117_gmted_mea075", instance.getFileName(74.116047, -169.277344)); assertEquals("70s180w_20101117_gmted_mea075", instance.getFileName(-61.015725, -156.621094)); assertEquals("70n150e_20101117_gmted_mea075", instance.getFileName(74.590108, 166.640625)); assertEquals("70s150e_20101117_gmted_mea075", instance.getFileName(-61.015725, 162.949219)); }
@Test public void testFileNotFound() { File file = new File(instance.getCacheDir(), instance.getFileName(46, -20) + ".gh"); File zipFile = new File(instance.getCacheDir(), instance.getFileName(46, -20) + ".tif"); file.delete(); zipFile.delete(); instance.setDownloader(new Downloader("test GH") { @Override public void downloadFile(String url, String toFile) throws IOException { throw new FileNotFoundException("xyz"); } }); assertEquals(0, instance.getEle(46, -20), 1); assertTrue(file.exists()); assertEquals(228, file.length()); instance.setDownloader(new Downloader("test GH") { @Override public void downloadFile(String url, String toFile) throws IOException { throw new SocketTimeoutException("xyz"); } }); try { instance.setSleep(30); instance.getEle(16, -20); assertTrue(false); } catch (Exception ex) { } file.delete(); zipFile.delete(); }