### Question:
DateDatatype extends SerializingCustomDatatype<Date> { @Override public String serialize(Date typedValue) { return new SimpleDateFormat(dateFormat).format(typedValue); }  @Override CustomDatatype.Summary doGetTextSummary(Date typedValue); @Override Date deserialize(String serializedValue); @Override String serialize(Date typedValue);  }### Answer:
@Test public void serialize_shouldConvertADateIntoAYmdStringRepresentation() throws ParseException { Date date = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").parse("2011-04-25 01:02:03"); Assert.assertEquals("2011-04-25", datatype.serialize(date)); }
@Test public void serialize_shouldConvertADateIntoAYmdStringRepresentation() throws Exception { Date date = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").parse("2011-04-25 01:02:03"); Assert.assertEquals("2011-04-25", datatype.serialize(date)); }