@Test
public void clientAcceptHeaderLovesJSON() throws ServletException, IOException, ListenerException, ConfigurationException {

	addListener("/ApiListenerAllow/", Methods.POST, null, MediaTypes.JSON);
	Map<String, String> headers = new HashMap<String, String>();
	headers.put("Accept", "application/json");
	Response result = service(createRequest("ApiListenerAllow", Methods.POST, "{}", headers));
	assertEquals(200, result.getStatus());
	assertEquals("{}", result.getContentAsString());
	assertEquals("OPTIONS, POST", result.getHeader("Allow"));
	assertTrue("Content-Type header does not contain [application/json]", result.getContentType().contains("application/json"));
	assertNull(result.getErrorMessage());
}