use of com.netflix.zuul.message.ZuulMessageImpl in project zuul by Netflix.
the class HttpUtilsTest method getBodySizeIfKnown_returnsContentLengthValue.
@Test
public void getBodySizeIfKnown_returnsContentLengthValue() {
SessionContext context = new SessionContext();
Headers headers = new Headers();
headers.add(com.netflix.zuul.message.http.HttpHeaderNames.CONTENT_LENGTH, "23450");
ZuulMessage msg = new ZuulMessageImpl(context, headers);
assertThat(HttpUtils.getBodySizeIfKnown(msg)).isEqualTo(Integer.valueOf(23450));
}
use of com.netflix.zuul.message.ZuulMessageImpl in project zuul by Netflix.
the class HttpUtilsTest method getBodySizeIfKnown_returnsNull.
@Test
public void getBodySizeIfKnown_returnsNull() {
SessionContext context = new SessionContext();
Headers headers = new Headers();
ZuulMessage msg = new ZuulMessageImpl(context, headers);
assertThat(HttpUtils.getBodySizeIfKnown(msg)).isNull();
}
Aggregations