### Question:
TimeToStringXmlAdapter extends XmlAdapter<String, Time> { @Override public String marshal(Time v) throws Exception { return DATE_FORMAT.format(v); }  @Override String marshal(Time v); @Override Time unmarshal(String v);  }### Answer:
@Test public void marshal_nullValue_throwsException_NullPointerException() throws Exception { assertThrows( NullPointerException.class, new Executable() { @Override public void execute() throws Exception { objectUnderTest.marshal(null); } } ); }
@Test public void marshal_someTime_stringRepresentation() throws Exception { String actual = objectUnderTest.marshal(Time.valueOf(TEST_TIME_STRING)); assertEquals(TEST_TIME_STRING + ".000", actual); }