ViewEngineContextImpl implements ViewEngineContext { @Override public <T> T getRequest(Class<T> type) { return type.cast(request); } ViewEngineContextImpl(String view, Models models, Object request, Object response,
                                 MultivaluedMap<String, Object> responseHeaders, OutputStream outputStream,
                                 MediaType mediaType, UriInfo uriInfo, ResourceInfo resourceInfo,
                                 Configuration configuration, Locale locale); @Override String getView(); @Override Models getModels(); @Override Locale getLocale(); @Override T getRequest(Class<T> type); @Override T getResponse(Class<T> type); @Override MultivaluedMap<String, Object> getResponseHeaders(); @Override OutputStream getOutputStream(); @Override MediaType getMediaType(); @Override UriInfo getUriInfo(); @Override ResourceInfo getResourceInfo(); @Override Configuration getConfiguration();  }
@Test public void testGetRequest() { ViewEngineContextImpl context = new ViewEngineContextImpl(null, null, null, null, null, null, null, null, null, null, null); assertNull(context.getRequest(Object.class)); HttpServletRequest request = EasyMock.createMock(HttpServletRequest.class); replay(request); context = new ViewEngineContextImpl(null, null, request, null, null, null, null, null, null, null, null); assertNotNull(context.getRequest(Object.class)); verify(request); }