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