### Question:
ParseUtils { public static int parseUnsignedInt(CharSequence s, final int start, final int end) throws NumberFormatException { int ret = 0; for (int i = start; i < end; i++) { final char c = s.charAt(i); if (c < '0' || c > '9') { throw new NumberFormatException("Not a valid base-10 digit: " + c + " in " + s.subSequence(start, end)); } final int val = c - '0'; ret = ret * 10 + val; } return ret; }  static int parseInt(String s, final int start, final int end); static int parseSignedInt(CharSequence s, final int start, final int end); static int parseUnsignedInt(CharSequence s, final int start, final int end); static long parseSignedLong(CharSequence s, final int start, final int end); static long parseUnsignedLong(CharSequence s, final int start, final int end); static float parseFloat(String s, final int start, final int end); static long parseTimestampFromUIDString(String s, final int start, final int end); static void urlDecodeInplace(StringBuilder input); static void urlDecodeInto(CharSequence input, int start, int end, StringBuilder result); static char decodeHexPair(char c1, char c2); static final char INVALID_HEX; }### Answer:
@Test(expected = NumberFormatException.class) public void testParseBadAlphaNumericInput() { ParseUtils.parseUnsignedInt("-a123", 0, 4); }
@Test(expected = NumberFormatException.class) public void testParseBadNaNInput() { ParseUtils.parseUnsignedInt("-Nana", 0, 4); }
@Test(expected = NumberFormatException.class) public void testParseBadInfinityInput() { ParseUtils.parseUnsignedInt("Inf", 0, 3); }