### Question:
ShowContactsController extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Contact> contacts = addressBook.getAll(); request.setAttribute("contacts", contacts); request.getRequestDispatcher(viewPath).forward(request, response); }  @Override void init(ServletConfig config); GlobalAddressBook getAddressBook(); void setAddressBook(GlobalAddressBook addressBook); String getViewPath();  }### Answer:
@Test public void testDoGet() throws ServletException, IOException { FakeHttpServletRequest fakeRequest = new FakeHttpServletRequest(); FakeHttpServletResponse fakeResponse = new FakeHttpServletResponse(); controller.doGet(fakeRequest, fakeResponse); assertSame(fakeRequest.getAttribute("contacts"), contactList); assertEquals("viewPath", fakeResponse.getForwardLocation()); }