String passwordHash = "5f4dcc3b5aa765d61d8327deb882cf99";
String email = "email@email.em";
LoginUserDto loginUserDto = createDefaultLoginUserDto();
Map<String, String> authInfo = createAuthInfo(username, email);
Group group = new Group(AdministrationGroup.USER.getName());
User commonUser = new User(username, email, password, null);
commonUser.getGroups().add(group);
when(groupDao.getGroupByName(group.getName())).thenReturn(group);
when(userDao.getByUsername(username)).thenReturn(null);
when(userDao.getCommonUserByUsername(username)).thenReturn(commonUser);
when(encryptionService.encryptPassword(password)).thenReturn(passwordHash);
prepareAuth();