### Question:
ParseInt implements IsParser<Integer> { @Override public Integer parse(JsonParser parser, Field field) throws IOException { return isValid(parser) ? new Integer(parser.getValueAsInt()) : null; }  @Override Integer parse(JsonParser parser, Field field);  }### Answer:
@Test public void parse() throws Exception { Integer expected = 42; ParseInt parseInt = new ParseInt(); Integer actual = parseInt.parse(getParser("<int>42</int>"), null); assertEquals(expected, actual); }
@Test public void parseEmpty() throws Exception { Integer expected = null; ParseInt parseInt = new ParseInt(); Integer actual = parseInt.parse(getParser("<int></int>"), null); assertEquals(expected, actual); }
@Test public void parseSpace() throws Exception { Integer expected = null; ParseInt parseInt = new ParseInt(); Integer actual = parseInt.parse(getParser("<int> </int>"), null); assertEquals(expected, actual); }