@Test
public void unmarshalIllegalFormatTest()
{

    RegistrationDateAdapter adapter = new RegistrationDateAdapter();
    try
    {
        adapter.unmarshal("2020-02");
    }
    catch (Exception e)
    {
        assertTrue(e instanceof IllegalArgumentException);
        assertTrue(e.getMessage().contains("Valid date or date and time format must be used when specifying values for start/end registration dates."));
    }
    try
    {
        adapter.unmarshal("2020-02-02T12:02AM");
    }
    catch (Exception e)
    {
        assertTrue(e instanceof IllegalArgumentException);
        assertTrue(e.getMessage().contains("Valid date or date and time format must be used when specifying values for start/end registration dates."));
    }
}