### Question:
TimestampToStringXmlAdapter extends XmlAdapter<String, Timestamp> { @Override public Timestamp unmarshal(String v) throws Exception { return new Timestamp(DATE_FORMAT.parse(v).getTime()); }  @Override Timestamp unmarshal(String v); @Override String marshal(Timestamp v);  }### Answer:
@Test public void unmarshal_nullValue_throwsException_NullPointerException() { assertThrows( NullPointerException.class, new Executable() { @Override public void execute() throws Exception { objectUnderTest.unmarshal(null); } } ); }
@Test public void unmarshal_someDateString_someTimestamp() throws Exception { Timestamp expected = Timestamp.valueOf(TEST_DATE_STRING); Timestamp actual = objectUnderTest.unmarshal(TEST_DATE_STRING); assertEquals(expected, actual); }