### Question:
GadgetRenderingServlet extends InjectedServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { UriStatus urlStatus = getUrlStatus(req); if (req.getHeader("If-Modified-Since") != null && !"1".equals(req.getParameter("nocache")) && urlStatus == UriStatus.VALID_VERSIONED) { resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED); return; } render(req, resp, urlStatus); }  @Inject void setRenderer(Renderer renderer); @Inject void setIframeUriManager(IframeUriManager iframeUriManager);  }### Answer:
@Test public void dosHeaderRejected() throws Exception { expect(request.getHeader(HttpRequest.DOS_PREVENTION_HEADER)).andReturn("foo"); control.replay(); servlet.doGet(request, recorder); assertEquals(HttpServletResponse.SC_FORBIDDEN, recorder.getHttpStatusCode()); }