Search in sources :

Example 6 with HttpResponse

use of com.yahoo.jdisc.http.HttpResponse in project vespa by vespa-engine.

the class EmptyResponseFilterTestCase method requireThatEmptyFilterDoesNothing.

@Test
public void requireThatEmptyFilterDoesNothing() throws Exception {
    final HttpRequest request = newRequest(Method.GET, "/status.html", Version.HTTP_1_1);
    final HttpResponse lhs = HttpResponse.newInstance(Response.Status.OK);
    final HttpResponse rhs = HttpResponse.newInstance(Response.Status.OK);
    EmptyResponseFilter.INSTANCE.filter(lhs, null);
    assertEquals(lhs.headers(), rhs.headers());
    assertEquals(lhs.context(), rhs.context());
    assertEquals(lhs.getError(), rhs.getError());
    assertEquals(lhs.getMessage(), rhs.getMessage());
}
Also used : HttpRequest(com.yahoo.jdisc.http.HttpRequest) HttpResponse(com.yahoo.jdisc.http.HttpResponse) Test(org.testng.annotations.Test)

Aggregations

HttpResponse (com.yahoo.jdisc.http.HttpResponse)6 HttpRequest (com.yahoo.jdisc.http.HttpRequest)5 Test (org.testng.annotations.Test)5 URI (java.net.URI)4 Cookie (com.yahoo.jdisc.http.Cookie)2 ContentChannel (com.yahoo.jdisc.handler.ContentChannel)1