public void testMarshalCollectionSunday() throws Exception
{
SchemaBinding schema = XsdBinder.bind(new StringReader(COLLECTION_XSD), null, SCHEMA_RESOLVER);
MarshallerImpl marshaller = new MarshallerImpl();
marshaller.setSchemaResolver(SCHEMA_RESOLVER);
marshaller.mapClassToXsiType(UKAddress.class, PO_NS, "UKAddress");
marshaller.mapClassToXsiType(USAddress.class, PO_NS, "USAddress");
StringWriter writer = new StringWriter();
PurchaseOrder po = new PurchaseOrder();
po.address = new Address[2];
po.address[0] = PurchaseOrder.INSTANCE.billTo;
po.address[1] = PurchaseOrder.INSTANCE.shipTo;
marshaller.marshal(schema, null, po, writer);
assertXmlEqual(COLLECTION_XML, writer.getBuffer().toString());
}