public void testPageContext() throws IOException {
assertNotNull("Page context should not be null", pageContext);
HttpServletRequestWrapper wrappedRequest =
(HttpServletRequestWrapper) pageContext.getRequest();
assertSame(request.getOriginalRequest(),
wrappedRequest.getOriginalRequest());
assertSame(response, pageContext.getResponse());
ServletConfigWrapper wrappedConfig =
(ServletConfigWrapper) pageContext.getServletConfig();
assertSame(config.getOriginalConfig(),
wrappedConfig.getOriginalConfig());
}
Verify that the page context is not null and that we can use it. |