### Question:
MonthsByteXmlAdapter extends XmlAdapter<ClientMonthsSortedSetWrapper, SortedSet<Byte>> { @Override public SortedSet<Byte> unmarshal(ClientMonthsSortedSetWrapper v) throws Exception { SortedSet<Byte> result = null; if(v != null && v.getMongths() != null && !v.getMongths().isEmpty()){ result = new TreeSet<Byte>(); for(String value : v.getMongths()) result.add(Byte.valueOf(value)); } return result; }  @Override SortedSet<Byte> unmarshal(ClientMonthsSortedSetWrapper v); @Override ClientMonthsSortedSetWrapper marshal(SortedSet<Byte> v);  }### Answer:
@Test public void unmarshal_nullValue_nullValue() throws Exception { SortedSet<Byte> actual = objectUnderTest.unmarshal(null); assertNull(actual); }
@Test public void unmarshal_wrapperWithNullDays_nullValue() throws Exception { ClientMonthsSortedSetWrapper wrapper = createClientDaysSortedSetWrapperWithNullMonths(); SortedSet<Byte> actual = objectUnderTest.unmarshal(wrapper); assertNull(actual); }
@Test public void unmarshal_wrapperWithoutMonths_nullValue() throws Exception { ClientMonthsSortedSetWrapper wrapper = createClientDaysSortedSetWrapperWithoutMonths(); SortedSet<Byte> actual = objectUnderTest.unmarshal(wrapper); assertNull(actual); }
@Test public void unmarshal_wrapperWithSomeMonths_someMonths() throws Exception { ClientMonthsSortedSetWrapper wrapper = createClientMonthsSortedSetWrapperWithMonths(); SortedSet<Byte> actual = objectUnderTest.unmarshal(wrapper); assertEquals(TEST_MONTH_AS_BYTES, actual); }