### Question:
AddContactController extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.getRequestDispatcher(formView).forward(request, response); }  GlobalAddressBook getAddressBook(); void setAddressBook(GlobalAddressBook addressBook); String getSuccessedSubmitRedirect(); void setSuccessedSubmitRedirect(String successedSubmitRedirect); String getFormView(); void setFormView(String formView);  }### Answer:
@Test public void testDoGetShowForm() throws ServletException, IOException { MockHttpServletRequest fakeRequest = new MockHttpServletRequest(); MockHttpServletResponse fakeResponse = new MockHttpServletResponse(); controller.doGet(fakeRequest, fakeResponse); assertEquals("formViewPath", fakeResponse.getForwardedUrl()); }
@Test public void testDoGetShowForm() throws ServletException, IOException { FakeHttpServletRequest fakeRequest = new FakeHttpServletRequest(); FakeHttpServletResponse fakeResponse = new FakeHttpServletResponse(); controller.doGet(fakeRequest, fakeResponse); assertEquals("formViewPath", fakeResponse.getForwardLocation()); }