when(mockRequest.getHeaderNames()).thenReturn(expectedHeaderNames);
when(mockRequest.getHeader("header1")).thenReturn("thisIsHeader1");
when(mockRequest.getInputStream()).thenReturn(new DummyServletInputStream(IOUtils.toInputStream(bodyContent)));
when(mockRequest.getContentType()).thenReturn(expectedContentType);
RealRequest realRequest = new HttpRealRequest(mockRequest);
assertThat((String) realRequest.getPath(), is(expectedPathInfo));
assertThat(realRequest.getMethod(), is(Method.GET));
assertThat(realRequest.getParams().size(), is(1));
assertThat((String) realRequest.getParams().get("hello").iterator().next(), is("world"));
assertThat((String) realRequest.getHeaders().get("header1"), is("thisIsHeader1"));
assertThat((String) realRequest.getBodyContentType(), is(expectedContentType));
}