public void testAcceptsProduces() throws Exception
{
// test that media type is chosen from resource method and accepts
{
ClientRequest request = new ClientRequest(generateURL("/mapper/accepts-produces"));
request.accept("application/json");
ClientResponse response = request.get();
Assert.assertEquals(412, response.getStatus());
Assert.assertEquals("application/json", response.getHeaders().getFirst("Content-Type"));
String error = (String) response.getEntity(String.class);
Assert.assertNotNull(error);