use of org.zaproxy.zap.network.HttpResponseBody in project zaproxy by zaproxy.
the class HttpMessageUnitTest method shouldSetContentEncodingsWhenSettingResponseBodyByte.
@Test
void shouldSetContentEncodingsWhenSettingResponseBodyByte() {
// Given
HttpResponseHeader header = mock(HttpResponseHeader.class);
given(header.getHeader(HttpHeader.CONTENT_ENCODING)).willReturn(HttpHeader.GZIP);
HttpResponseBody body = mock(HttpResponseBody.class);
HttpMessage message = new HttpMessage(mock(HttpRequestHeader.class), mock(HttpRequestBody.class), header, body);
// When
message.setResponseBody(new byte[0]);
// Then
assertThat(encodings(body), is(not(empty())));
}
Aggregations