response.put("message", message);
ERXKeyFilter messageFilter = new ERXKeyFilter(ERXKeyFilter.Base.Attributes);
messageFilter.setUnknownKeyIgnored(true);
messageFilter.include("message.subject");
messageFilter.include("message.message");
messageFilter.include("message.priority");
assertEquals("{\"message\":{\"subject\":\"this is a subject\",\"message\":\"this is a message\",\"priority\":10}}\n", ERXRestFormat.json().toString(response, messageFilter));
response.remove("message");
assertEquals("{\"nil\":true}\n", ERXRestFormat.json().toString(response, messageFilter));