### Question:
TimeZoneXmlAdapter extends XmlAdapter<String, TimeZone> { @Override public String marshal(TimeZone v) throws Exception { return v.getID(); }  @Override TimeZone unmarshal(String v); @Override String marshal(TimeZone 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_someTimeZone_string_representation() throws Exception { String actual = objectUnderTest.marshal(TimeZone.getTimeZone(TEST_TIMEZONE_ID)); assertEquals(TEST_TIMEZONE_ID, actual); }