public void testCustomIdKeyFormat() {
EOEditingContext editingContext = ERXEC.newEditingContext(_osc);
editingContext.lock();
try {
Car c = Car.cars().objectAtIndex(0);
ERXRestFormat format = new ERXRestFormat("json", new ERXXmlRestParser(), new ERXXmlRestWriter(), new ERXRestFormatDelegate("CUSTOMID", "type", "nil", true, true, true, true, true));
assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<car CUSTOMID=\"Cooper S\" type=\"car\">\n" + " <name>Cooper S</name>\n" + "</car>\n", format.toString(c, ERXKeyFilter.filterWithAttributes(), new ERXRestContext(editingContext)));
}
finally {
editingContext.unlock();