public async Task GivenASearchResourceHistoryRequest_WhenHandled_ThenABundleShouldBeReturned()
        {
            var request = new SearchResourceHistoryRequest("Patient");

            var searchResult = new SearchResult(Enumerable.Empty <SearchResultEntry>(), new Tuple <string, string> [0], Array.Empty <(string parameterName, string reason)>(), null);

            _searchService.SearchHistoryAsync(request.ResourceType, null, null, null, null, null, null, CancellationToken.None).Returns(searchResult);

            var expectedBundle = new Bundle().ToResourceElement();

            _bundleFactory.CreateHistoryBundle(searchResult).Returns(expectedBundle);

            SearchResourceHistoryResponse actualResponse = await _searchResourceHistoryHandler.Handle(request, CancellationToken.None);

            Assert.NotNull(actualResponse);
            Assert.Equal(expectedBundle, actualResponse.Bundle);
        }
 public async Task GivenANullMessage_WhenHandleIsCalled_ThenExceptionShouldBeThrown()
 {
     await Assert.ThrowsAsync <ArgumentNullException>(ParamNameMessage, () => _searchResourceHandler.Handle(null, CancellationToken.None));
 }