### Question:
MakeRequestServlet extends InjectedServlet { @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { doGet(request, response); }  @Inject void setMakeRequestHandler(MakeRequestHandler makeRequestHandler);  }### Answer:
@Test public void testDoPostNormal() throws Exception { setupPost(); expect(pipeline.execute(internalRequest)).andReturn(internalResponse); replay(); servlet.doPost(request, recorder); assertResponseOk(HttpResponse.SC_OK, RESPONSE_BODY); }
@Test public void testDoPostException() throws Exception { setupPost(); expect(pipeline.execute(internalRequest)).andThrow( new GadgetException(GadgetException.Code.FAILED_TO_RETRIEVE_CONTENT, ERROR_MESSAGE)); replay(); servlet.doPost(request, recorder); assertEquals(HttpServletResponse.SC_BAD_REQUEST, recorder.getHttpStatusCode()); assertContains(ERROR_MESSAGE, recorder.getResponseAsString()); }