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

	addListener("/ApiListenerThatProducesJSON/", Methods.POST, null, MediaTypes.JSON);
	Response result = service(createRequest("ApiListenerThatProducesJSON", Methods.POST, "{}"));
	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());
}