### Question:
NoTimezoneDateToStringXmlAdapter extends XmlAdapter<String, Date> { @Override public String marshal(Date v) throws Exception { return new SimpleDateFormat(DATE_TIME_PATTERN).format(v); }  @Override Date unmarshal(String v); @Override String marshal(Date v); static final String DATE_TIME_PATTERN; }### Answer:
@Test public void marshal_nullValue_throws_NullPointerException() { assertThrows( NullPointerException.class, new Executable() { @Override public void execute() throws Exception { objectUnderTest.marshal(null); } } ); }
@Test public void marshal_someDate_wrapper() throws Exception { String actual = objectUnderTest.marshal(createTestDate()); assertEquals(TEST_DATE_TIME_STRING, actual); }