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