}
@Test
public void userShouldNotBeRegisteredIfSomeErrorOccurred()
throws JAXBException, IOException, NoConnectionException, UnexpectedErrorException {
UserDto userDto = createUserDto("user", "", "");
Map<String, String> errors = new HashMap<>();
errors.put("email", "Invalid email");
errors.put("password", "Invalid password");
when(service.registerUser(userDto, false)).thenReturn(errors);