assertEquals(response.getStatus(), JsonResponseStatus.FAIL, "Unexpected error should fail registration.");
}
@Test
public void testRegisterAjaxFailIfConnectionErrorOccurred() throws Exception {
RegisterUserDto dto = createRegisterUserDto(null);
doThrow(new NoConnectionException()).when(authenticator).register(dto);
JsonResponse response = userController.registerUserAjax(dto, request, Locale.ENGLISH);
assertEquals(response.getStatus(), JsonResponseStatus.FAIL, "Connection error should fail registration.");