@Test
public void testRequestWrapperGetInputStream() throws Exception {
final HttpServletRequest request = mockContext.mock(HttpServletRequest.class);
final ServletInputStream servletInputStream = mockContext.mock(ServletInputStream.class);
RequestWrapper wrapper = new RequestWrapper(request);
mockContext.checking(new Expectations() {
{
oneOf(request).getInputStream();
will(returnValue(servletInputStream));
}
});
ServletInputStream m = wrapper.getInputStream();
assertTrue(m instanceof LoggedServletInputStream);
assertSame((LoggedServletInputStream)m, wrapper.getLoggedInputStream());
mockContext.assertIsSatisfied();
}