};
}
private void testCustomDateFormat(ClientProvider pProvider) throws Exception {
final DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
XmlRpcClient client = pProvider.getClient();
XmlRpcClientConfigImpl config = getConfig(pProvider);
client.setConfig(config);
TypeFactory typeFactory = getCustomDateTypeFactory(client, format);
client.setTypeFactory(typeFactory);
Calendar cal1 = Calendar.getInstance();
XmlRpcRequest request = new XmlRpcClientRequestImpl(config, "DateConverter.tomorrow", new Object[]{cal1.getTime()});
final String got = XmlRpcTestCase.writeRequest(client, request);
final String expect = "<?xml version=\"1.0\" encoding=\"US-ASCII\"?>"
+ "<methodCall><methodName>DateConverter.tomorrow</methodName>"
+ "<params><param><value><dateTime.iso8601>" + format.format(cal1.getTime())
+ "</dateTime.iso8601></value></param></params></methodCall>";
assertEquals(expect, got);
XmlRpcServer server = pProvider.getServer();
server.setTypeFactory(getCustomDateTypeFactory(server, format));
Date date = (Date) client.execute(request);
Calendar cal2 = Calendar.getInstance();
cal2.setTime(date);
cal1.add(Calendar.DAY_OF_MONTH, 1);
assertEquals(cal1, cal2);
}