### Question:
ExcludeDaysXmlAdapter extends XmlAdapter<ClientExcludeDaysWrapper, ArrayList<Calendar>> { @Override public ArrayList<Calendar> unmarshal(ClientExcludeDaysWrapper v) throws Exception { ArrayList<Calendar> result = null; if(v != null && v.getExcludeDays() != null && !v.getExcludeDays().isEmpty()){ result = new ArrayList<Calendar>(); for (String currentCalendarString : v.getExcludeDays()){ final Date date = format.parse(currentCalendarString); Calendar currentCalendar = Calendar.getInstance(); currentCalendar.setTime(date); result.add(currentCalendar); } } return result; }  @Override ArrayList<Calendar> unmarshal(ClientExcludeDaysWrapper v); @Override ClientExcludeDaysWrapper marshal(ArrayList<Calendar> v);  }### Answer:
@Test public void unmarshal_nullValue_nullValue() throws Exception { ArrayList<Calendar> actual = objectUnderTest.unmarshal(null); assertNull(actual); }
@Test public void unmarshal_wrapperWithNullDays_nullValue() throws Exception { ClientExcludeDaysWrapper wrapper = createClientExcludeDaysWrapperWithNullDays(); ArrayList<Calendar> actual = objectUnderTest.unmarshal(wrapper); assertNull(actual); }
@Test public void unmarshal_wrapperWithoutDays_nullValue() throws Exception { ClientExcludeDaysWrapper wrapper = createClientExcludeDaysWrapperWithoutDays(); ArrayList<Calendar> actual = objectUnderTest.unmarshal(wrapper); assertNull(actual); }
@Test public void unmarshal_wrapperWithSomeCalendars_someCalendars() throws Exception { ClientExcludeDaysWrapper wrapper = createClientExcludeDaysWrapperWithDays(); ArrayList<Calendar> expected = (ArrayList<Calendar>) createCalendars(); ArrayList<Calendar> actual = objectUnderTest.unmarshal(wrapper); assertEquals(expected, actual); }