use of org.glassfish.jersey.test.inmemory.InMemoryTestContainerFactory in project jersey by jersey.
the class ResponseWriterMetadataTest method testResponse.
@Test
public void testResponse() {
final Response response = target().request().get();
assertThat(response.readEntity(String.class), is("one"));
assertThat(response.getHeaderString("X-BEFORE-WRITE"), is("foo"));
if (factory instanceof InMemoryTestContainerFactory) {
assertThat(response.getHeaderString("X-AFTER-WRITE"), is("bar"));
} else {
assertThat(response.getHeaderString("X-AFTER-WRITE"), nullValue());
}
}
Aggregations