public async Task SearchDatasetRelationships_GivenNullResultsReturnedFromSearch_ReturnsStatusCode500()
        {
            // Arrange
            SearchRequestViewModel requestModel = new SearchRequestViewModel();

            IDatasetRelationshipsSearchService searchService = CreateSearchService();

            searchService
            .PerformSearch(Arg.Any <SearchRequestViewModel>())
            .Returns((SpecificationDatasourceRelationshipSearchResultViewModel)null);

            DatasetRelationshipsSearchController controller = CreateController(searchService);

            // Act
            IActionResult actionResult = await controller.SearchDatasetRelationships(requestModel);

            // Asserts
            actionResult
            .Should()
            .BeOfType <StatusCodeResult>();

            StatusCodeResult statusCodeResult = actionResult as StatusCodeResult;

            statusCodeResult
            .StatusCode
            .Should()
            .Be(500);
        }
        public void SearchDatasetRelationships_GivenNullRequestObject_ThrowsArgumentNullException()
        {
            // Arrange
            DatasetRelationshipsSearchController controller = CreateController();

            SearchRequestViewModel requestModel = null;

            // Act
            Func <Task> test = async() => await controller.SearchDatasetRelationships(requestModel);

            // Assert
            test
            .Should()
            .ThrowExactly <ArgumentNullException>();
        }