### Question:
ParseDouble implements IsParser<Double> { @Override public Double parse(JsonParser parser, Field field) throws IOException { return isValid(parser) ? new Double(parser.getValueAsDouble()) : null; }  @Override Double parse(JsonParser parser, Field field);  }### Answer:
@Test public void parse() throws Exception { Double expected = 12d; ParseDouble parseDouble = new ParseDouble(); Double actual = parseDouble.parse(getParser("<double>12.00</double>"), null); assertEquals(expected, actual); }
@Test public void parseEmpty() throws Exception { Double expected = null; ParseDouble parseDouble = new ParseDouble(); Double actual = parseDouble.parse(getParser("<double></double>"), null); assertEquals(expected, actual); }
@Test public void parseSpace() throws Exception { Double expected = null; ParseDouble parseDouble = new ParseDouble(); Double actual = parseDouble.parse(getParser("<double> </double>"), null); assertEquals(expected, actual); }