@Test public void testSaveAndProceedNext_ExistingUser() throws ValidationException, GridInvocationException { FirebirdWebTestUtility.setCurrentUser(action, user); assertEquals(VerificationPageFlowAction.MY_ACCOUNT_RETURN, action.saveAndProceedNext()); verify(mockAccountService).addRoles(user, action.getAccountConfigurationData()); verify(getMockSession()).setAttribute(FirebirdUIConstants.ROLES_UPDATED, true); }
@Test public void testSaveAndProceedNext_NewUser() throws ValidationException, GridInvocationException { assertEquals(VerificationPageFlowAction.USER_HOME_RETURN, action.saveAndProceedNext()); verify(mockAccountService).create(action.getAccountConfigurationData()); }