### Question:
RealNumberAdapter extends XmlAdapter<String, Number> { @Override public Number unmarshal(String value){ return NumberUtil.parseNumber(value); }  @Override Number unmarshal(String value); @Override String marshal(Number value);  }### Answer:
@Test public void unmarshal(){ RealNumberAdapter adapter = new RealNumberAdapter(); assertEquals(Double.NaN, adapter.unmarshal("NaN")); assertEquals(Double.NEGATIVE_INFINITY, adapter.unmarshal("-INF")); assertEquals(Double.POSITIVE_INFINITY, adapter.unmarshal("INF")); try { adapter.unmarshal("Infinity"); fail(); } catch(IllegalArgumentException iae){ } assertEquals(1, adapter.unmarshal("1")); assertEquals(1d, adapter.unmarshal("1.0")); }