public void ShouldLoadProductsWhenSearchEventRecieved()
        {
            var searchTerm = "searchTerm";
            var message = new SearchMessage(searchTerm);
            var products = new List<Product>();
            var product = new Product();

            _productsServiceMock
                .Setup(p => p.GetProducts(searchTerm))
                .Returns(products)
                .Verifiable();

            _messenger.Send(message);
            Utilities.WaitFor(() => _viewModel.Products != null, 5000);

            _productsServiceMock.Verify();
            Assert.AreEqual(products, _viewModel.Products);
        }
 private void HandleSearch(SearchMessage message)
 {
     Task.Run(() => PerformSearch(message.SearchTerm))
         .ContinueWith(PerformSearchComplete);
 }