### Question:
DateXarObjectPropertySerializer implements XarObjectPropertySerializer { public static String serializeDate(Object date) { SimpleDateFormat format = new SimpleDateFormat(DEFAULT_FORMAT); return date == null ? "" : format.format(date); }  static Date parseDate(String source); static String serializeDate(Object date); @Override Object read(XMLStreamReader reader); @Override void write(XMLStreamWriter writer, Object value); static final String DEFAULT_FORMAT; }### Answer:
@Test void serializeDate() { Date date = new Date(); DateFormat format = new SimpleDateFormat(DateXarObjectPropertySerializer.DEFAULT_FORMAT); String string = format.format(date); assertEquals(string, DateXarObjectPropertySerializer.serializeDate(date)); }
@Test void serializeDateNull() { assertEquals("", DateXarObjectPropertySerializer.serializeDate(null)); }