public async void GetCouncilTaxBenefitPaymentHistory_ShouldCallService() { // Arrange _mockService.Setup(_ => _.GetCouncilTaxBenefitPaymentHistory(It.IsAny <string>())) .ReturnsAsync(It.IsAny <List <PaymentDetail> >()); // Act var result = await _controller.GetCouncilTaxBenefitPaymentHistory(It.IsAny <string>()); // Assert _mockService.Verify(_ => _.GetCouncilTaxBenefitPaymentHistory(It.IsAny <string>()), Times.Once); var actionResult = Assert.IsType <OkObjectResult>(result); Assert.Equal(200, actionResult.StatusCode); }