### Question:
SrtmTile { public int getElevation(double lon, double lat) { int x = (int)Math.round((lon - this.lon) * 1200); int y = (int)Math.round((lat - this.lat) * 1200); int pos = (1200 - y) * (1201 * 2) + (x * 2); return getBuffer().getShort(pos); } SrtmTile(File file);  SrtmTile(InputStream in, int lon, int lat); boolean hasData(double lon, double lat); int getElevation(double lon, double lat); int getLat(); int getLon();  }### Answer:
@Test public void testElevation() throws Exception { SrtmTile srtmTile = new SrtmTile(SrtmTileTest.class.getResourceAsStream("/N49E009.hgt"), 9, 49); assertEquals(167, srtmTile.getElevation(9.16594, 49.27741)); assertEquals(359, srtmTile.getElevation(9, 49)); assertEquals(289, srtmTile.getElevation(9.999999, 49.999999)); }