public async Task GetAllAsync_Should_Return_NotFound() { const int skip = 1; const int take = 2; _historyService.Setup(service => service.GetAllAsync(It.IsAny <int>(), It.IsAny <int>())) .ReturnsAsync(new HistoryItem[0]); var actual = await _historyController.GetAllAsync(skip, take).ConfigureAwait(false); var notFound = actual as NotFoundResult; _historyService.Verify( service => service.GetAllAsync(It.Is <int>(i => i == skip), It.Is <int>(i => i == take)), Times.Once); Assert.NotNull(notFound); }