MockHttpSession mockHttpSession = new MockHttpSession();
mockHttpSession.setAttribute(LoginController.REQUESTED_URL, "someUrl");
String view = this.loginController.handleLogin("john", "secret", mockHttpSession);
Account account = (Account) mockHttpSession.getAttribute(LoginController.ACCOUNT_ATTRIBUTE);
assertNotNull(account);
assertEquals("John", account.getFirstName());
assertEquals("Doe", account.getLastName());
assertNull(mockHttpSession.getAttribute(LoginController.REQUESTED_URL));
assertEquals("redirect:someUrl", view);
// Test the different view selection choices
mockHttpSession = new MockHttpSession();