public async Task <IHttpActionResult> Search([FromUri(Name = "")] SearchApprenticeshipParameters searchApprenticeshipParameters)
        {
            var results =
                await _searchOrchestrator.SearchApprenticeship(searchApprenticeshipParameters).ConfigureAwait(false);

            return(Ok(results));
        }
        public void AndParametersAreNull_ThenThrowsValidationException()
        {
            Func <Task> action = async() =>
            {
                await _orchestrator.SearchApprenticeship(null);
            };

            action.ShouldThrow <ValidationException>()
            .WithMessage($"Validation failed: \r\n -- {_expectedErrorMessage}");

            _mockValidationExceptionBuilder.Verify(builder =>
                                                   builder.Build(
                                                       ErrorCodes.SearchApprenticeships.InvalidRequest,
                                                       Vacancy.Domain.Validation.ErrorMessages.SearchApprenticeships.SearchApprenticeshipParametersIsNull,
                                                       It.IsAny <string>()), Times.Once);
        }