@Test
public void testDoGet() throws IOException {

  final HttpServletRequest request = mock(HttpServletRequest.class);
  final HttpServletResponse response = mock(HttpServletResponse.class);
  final StringWriter stringWriter = new StringWriter();
  when(response.getWriter()).thenReturn(new PrintWriter(stringWriter));
  guestbookServlet.doGet(request, response);
  final User currentUser = UserServiceFactory.getUserService().getCurrentUser();
  assertEquals("Hello, " + currentUser.getNickname() + "\n", stringWriter.toString());
}