### Question:
HttpGadgetContext extends GadgetContext { @Override public String getParameter(String name) { return request.getParameter(name); } HttpGadgetContext(HttpServletRequest request); @Override String getParameter(String name); @Override String getContainer(); @Override String getHost(); @Override String getUserIp(); @Override boolean getDebug(); @Override boolean getIgnoreCache(); @Override Locale getLocale(); @Override int getModuleId(); @Override RenderingContext getRenderingContext(); @Override SecurityToken getToken(); @Override Uri getUrl(); @Override UserPrefs getUserPrefs(); @Override String getView(); @Override String getUserAgent(); static final String USERPREF_PARAM_PREFIX; }### Answer:
@Test public void testGetParameter() { expect(request.getParameter("foo")).andReturn("bar"); replay(); GadgetContext context = new HttpGadgetContext(request); assertEquals("bar", context.getParameter("foo")); }