### Question:
RtcDateTimeAdapter extends XmlAdapter<String, Date> { @Override public String marshal(Date value) { if (value == null) { return null; } final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_TIME_PATTERN); simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); return simpleDateFormat.format(value); }  @Override Date unmarshal(String value); @Override String marshal(Date value);  }### Answer:
@Test public void marshal_should_format_date() { final String formattedDate = cut.marshal(new Date(978299995987L)); assertThat(formattedDate).isEqualTo("2000-12-31T21:59:55.987+0000"); }
@Test public void marshal_should_return_null_for_null_values() { final String formattedDate = cut.marshal(null); assertThat(formattedDate).isNull(); }