### Question:
RtcDateTimeAdapter extends XmlAdapter<String, Date> { @Override public Date unmarshal(String value) throws ParseException { if (StringUtils.isEmpty(value)) { return null; } return new SimpleDateFormat(DATE_TIME_PATTERN).parse(value); }  @Override Date unmarshal(String value); @Override String marshal(Date value);  }### Answer:
@Test public void unmarshal_should_parse_date() throws ParseException { final Date date = cut.unmarshal("2000-12-31T23:59:55.987+0200"); assertThat(date.getTime()).isEqualTo(978299995987L); }
@Test public void unmarshal_should_return_null_for_null_values() throws ParseException { final Date date = cut.unmarshal(null); assertThat(date).isNull(); }
@Test public void unmarshal_should_return_null_for_empty_values() throws ParseException { final Date date = cut.unmarshal(""); assertThat(date).isNull(); }