### Question:
MakeRequestHandler implements ContainerConfig.ConfigObserver { protected static String getParameter(HttpServletRequest request, String key, String defaultValue) { String ret = request.getParameter(key); return ret != null ? ret : defaultValue; } @Inject  MakeRequestHandler(
          ContainerConfig config,
          RequestPipeline requestPipeline,
          @RewriterRegistry(rewriteFlow = RewriteFlow.DEFAULT) ResponseRewriterRegistry contentRewriterRegistry,
          Provider<FeedProcessor> feedProcessorProvider, GadgetAdminStore gadgetAdminStore,
          Processor processor, LockedDomainService lockedDomainService); void fetch(HttpServletRequest request, HttpServletResponse response); void containersChanged(ContainerConfig config, Collection<String> changed,
      Collection<String> removed); static final String ALIAS_PARAM; static final String POST_DATA_PARAM; static final String METHOD_PARAM; static final String HEADERS_PARAM; static final String CONTENT_TYPE_PARAM; static final String NUM_ENTRIES_PARAM; static final String DEFAULT_NUM_ENTRIES; static final String GET_SUMMARIES_PARAM; static final String GET_FULL_HEADERS_PARAM; static final String AUTHZ_PARAM; static final String MAX_POST_SIZE_KEY; static final String MULTI_PART_FORM_POST; static final String MULTI_PART_FORM_POST_IFRAME; static final String GADGETS_FEATURES; static final String CORE_IO; static final String UNPARSEABLE_CRUFT; static final int MAX_POST_SIZE_DEFAULT; static final String IFRAME_RESPONSE_PREFIX; static final String IFRAME_RESPONSE_SUFFIX; }### Answer:
@Test public void testGetParameter() { expect(request.getParameter("foo")).andReturn("bar"); replay(); assertEquals("bar", MakeRequestHandler.getParameter(request, "foo", "not foo")); }
@Test public void testGetParameterWithNullValue() { expect(request.getParameter("foo")).andReturn(null); replay(); assertEquals("not foo", MakeRequestHandler.getParameter(request, "foo", "not foo")); }