@Test
public void testGetWithProduceWithHead() throws Exception {
initiateWebApplication(ResourceGetWithProduceWithHead.class);
MediaType foo = MediaType.valueOf("application/foo");
ContainerResponse response = app.apply(RequestContextBuilder.from("/", "HEAD").accept(foo).build()).get();
assertEquals(200, response.getStatus());
assertFalse(response.hasEntity());
assertEquals(foo, response.getMediaType());
assertEquals("FOO-HEAD", response.getHeaders().getFirst("X-TEST").toString());
MediaType bar = MediaType.valueOf("application/bar");
response = app.apply(RequestContextBuilder.from("/", "HEAD").accept(bar).build()).get();
assertEquals(200, response.getStatus());
assertFalse(response.hasEntity());
assertEquals(bar, response.getMediaType());
assertEquals("BAR-HEAD", response.getHeaders().getFirst("X-TEST").toString());
}