use of org.simbasecurity.core.service.manager.dto.ChangePasswordDTO in project simba-os by cegeka.
the class UserServiceTest method setup.
@Before
public void setup() {
changePasswordDTO = new ChangePasswordDTO();
changePasswordDTO.setUserName(userName);
changePasswordDTO.setNewPassword(newPassword);
changePasswordDTO.setNewPasswordConfirmation(newPasswordConfirmation);
Session aSession = mock(Session.class);
when(sessionRepository.findBySSOToken(ssoToken)).thenReturn(aSession);
correspondingUser = mock(User.class);
when(aSession.getUser()).thenReturn(correspondingUser);
when(userRepository.findByName(userName)).thenReturn(correspondingUser);
when(correspondingUser.getUserName()).thenReturn(userName);
responseMock = mock(HttpServletResponse.class);
}
Aggregations