@Test
public void userShouldBeRegisteredUsingEncryptedPassword() throws Exception{
String password = "password";
RegisterUserDto registerUserDto = createRegisterUserDto("username", password, "email@email.em", null);
EncryptionService realEncryptionService = new EncryptionService(new Md5PasswordEncoder());
TransactionalAuthenticator authenticatorSpy = spy(new TransactionalAuthenticator(pluginLoader, userDao, groupDao,
realEncryptionService, mailService, avatarService, pluginService,
securityFacade, rememberMeServices, sessionStrategy, validator, authenticationManager));
authenticatorSpy.register(registerUserDto);