ApplicationHandler app = createApplication(MultipleResource.class);
MediaType foo = MediaType.valueOf("application/foo");
MediaType bar = MediaType.valueOf("application/bar");
ContainerResponse response = app.apply(RequestContextBuilder.from("/", "GET").accept(foo).build()).get();
assertTrue("Status: " + response.getStatus(), response.getStatus() < 300);
assertEquals("GET", response.getEntity());
assertEquals(foo, response.getMediaType());
response = app.apply(RequestContextBuilder.from("/", "GET").accept(bar).build()).get();