editingContext.lock();
try {
NSArray<Company> cs = new NSArray<Company>(Company.createCompany(editingContext, "Mike"));
ERXRestFormat format = new ERXRestFormat("json", new ERXXmlRestParser(), new ERXXmlRestWriter(), new ERXRestFormatDelegate("id", "type", "nil", false, true, true, false, false));
ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes();
filter.include("nonModelAttribute");
assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<companies>\n" + " <company>\n" + " <name>Mike</name>\n" + " <revenue/>\n" + " <non_model_attribute>NonModelAttribute</non_model_attribute>\n" + " </company>\n" + "</companies>\n", format.toString(EOClassDescription.classDescriptionForEntityName(Company.ENTITY_NAME), cs, filter, new ERXRestContext(editingContext)));
}
finally {
editingContext.unlock();
editingContext.dispose();