### Question:
XSDPrimitiveTypeParser { public static short parseShort(final Reader reader) throws IOException { final int i = parseInt(reader); if ((i < Short.MIN_VALUE) || (i > Short.MAX_VALUE)) { throw new NumberFormatException("Short overflow"); } return (short) i; }  static short parseShort(final Reader reader); static int parseInt(final Reader reader); static long parseLong(final Reader reader); static float parseFloat(final Reader reader); static double parseDouble(final Reader reader);  }### Answer:
@Test(expected=NumberFormatException.class) public void testOverflowMaxShort() throws IOException { XSDPrimitiveTypeParser.parseShort(new StringReader("32768")); }
@Test(expected=NumberFormatException.class) public void testOverflowMinShort() throws IOException { XSDPrimitiveTypeParser.parseShort(new StringReader("-32769")); }