when(localeHolderWrapperMock.getCurrentLocale()).thenReturn(Locale.US);
when(messageSourceMock.getMessage(ERROR_MESSAGE_CODE_EMPTY_TODO_TITLE, titleError.getArguments(), Locale.US)).thenReturn(ERROR_MESSAGE_CODE_EMPTY_TODO_TITLE);
when(messageSourceMock.getMessage(ERROR_MESSAGE_CODE_TOO_LONG_DESCRIPTION, descriptionError.getArguments(), Locale.US)).thenReturn(ERROR_MESSAGE_CODE_TOO_LONG_DESCRIPTION);
FormValidationErrorDTO dto = controller.handleFormValidationError(validationError);
verify(localeHolderWrapperMock, times(1)).getCurrentLocale();
verifyNoMoreInteractions(localeHolderWrapperMock);
verify(messageSourceMock, times(1)).getMessage(ERROR_MESSAGE_CODE_EMPTY_TODO_TITLE, titleError.getArguments(), Locale.US);
verify(messageSourceMock, times(1)).getMessage(ERROR_MESSAGE_CODE_TOO_LONG_DESCRIPTION, descriptionError.getArguments(), Locale.US);
verifyNoMoreInteractions(messageSourceMock);
verifyZeroInteractions(serviceMock);
List<FieldValidationErrorDTO> fieldErrorDTOs = dto.getFieldErrors();
assertEquals(2, fieldErrorDTOs.size());
FieldValidationErrorDTO titleFieldErrorDTO = fieldErrorDTOs.get(0);
assertEquals(FIELD_TITLE, titleFieldErrorDTO.getPath());