### Question:
TileDownload { protected static int getNumAfterIndex(String s, int start) throws ParseException { if (!Character.isDigit(s.charAt(start))) { throw new ParseException(String.format("No digit recognized at " + "index %s in %s, just '%s'", start, s, s.charAt(start)), start); } int last = start + 1; search: while (last < s.length()) { if (Character.isDigit(s.charAt(last))) { last++; } else { break search; } } return Integer.parseInt(s.substring(start, last)); }  boolean exists(double lat, double lon); abstract boolean exists(int lat, int lon); File[][] getTiles(Area ar); File getTile(CoordinateInt c); File getTile(double lat, double lon); abstract File getTile(int lat, int lon); static String getNonationNSEW(int lat, int lon);  }### Answer:
@Test public void testGetNumAfterIndex() throws Exception { String input = "N47E011.hgt.zip"; try { int n = TileDownload.getNumAfterIndex(input, 1); int e = TileDownload.getNumAfterIndex(input, 4); assertEquals(47, n); assertEquals(11, e); } catch(NumberFormatException ex) { fail(ex.getMessage()); } catch(ParseException ex) { fail(ex.getMessage()); } }