* Test serializing an object with date and timestamp properties.
*/
public void testDateComplex()
{
// Configure date/timestamp formats
XmlIOConfig config = XmlIOConfig.getInstance();
// Override the default date and timestamp converters to use a different
// format.
DateConverter dconv = new DateConverter("yyyy-MM-dd");
config.addConverter(dconv);
TimestampConverter tconv = new TimestampConverter("yyyy-MM-dd HH:mm");
config.addConverter(tconv);
List plist = new LinkedList();
PropertyMap pmap = new PropertyMap("created");
plist.add(pmap);
pmap = new PropertyMap("startDate");
plist.add(pmap);
pmap = new PropertyMap("startTime");
dconv = new DateConverter("HH:mm:ss");
pmap.setConverter(dconv);
plist.add(pmap);
pmap = new PropertyMap("endTime");
pmap.setConverter(dconv);
plist.add(pmap);
pmap = new PropertyMap("calendar");
pmap.setConverter(new GregorianCalendarConverter());
plist.add(pmap);
ObjectMap omap = new ObjectMap("TestHelperDate", "TestHelperDate", plist);
config.addObjectMap(omap);
CharArrayWriter output = new CharArrayWriter();
assertNotNull(output);
TestHelperDate helper = new TestHelperDate();
assertNotNull(helper);