public async void GetTest()
        {
            // Arrange
            var mockLogManager             = new Mock <ILogManager>();
            var mockPayrollLimitValidator  = new Mock <IPayrollLimitValidator>();
            var mockPayrollLimitRepository = new Mock <IPayrollLimitRepository>();
            var mockPayrollLimit           = new Mock <IPayrollLimit>();

            // Setup mock methods/properties
            mockPayrollLimit.Setup(c => c.Id).Returns(It.IsAny <int>());
            mockPayrollLimitRepository.Setup(x => x.GetByIdAsync(It.IsAny <int>()))
            .Returns(Task.FromResult(new GetResponse <IPayrollLimit> {
                Message = "Successful."
            }));

            // Act
            var sut = new PayrollLimitApplicationService(
                mockLogManager.Object, mockPayrollLimitRepository.Object, mockPayrollLimitValidator.Object);
            var response = await sut.GetAsync(It.IsAny <int>());

            // Assert
            response.IsSuccessful.Should().BeTrue();
            response.Errors.Count.Should().Be(0);
            response.Message.Should().NotBeNullOrEmpty();

            // Verify the application service is calling the correct repository method.
            mockPayrollLimitRepository.Verify(x => x.GetByIdAsync(It.IsAny <int>()));
        }
        public async void GetErrorTest()
        {
            // Arrange
            var mockLogManager             = new Mock <ILogManager>();
            var mockPayrollLimitValidator  = new Mock <IPayrollLimitValidator>();
            var mockPayrollLimitRepository = new Mock <IPayrollLimitRepository>();
            var mockPayrollLimit           = new Mock <IPayrollLimit>();

            // Setup mock methods/properties
            mockPayrollLimitRepository.Setup(x => x.GetByIdAsync(It.IsAny <int>()))
            .Throws(new Exception());
            mockPayrollLimit.Setup(c => c.Id).Returns(It.IsAny <int>());

            // Act
            var sut = new PayrollLimitApplicationService(
                mockLogManager.Object, mockPayrollLimitRepository.Object, mockPayrollLimitValidator.Object);
            var response = await sut.GetAsync(It.IsAny <int>());

            // Assert
            response.IsSuccessful.Should().BeFalse();
            response.Errors.Count.Should().BeGreaterThan(0);
            response.Message.Should().NotBeNullOrEmpty();

            // Verify the application service is calling the correct repository method.
            mockPayrollLimitRepository.Verify(x => x.GetByIdAsync(It.IsAny <int>()));

            // Verify the application service is logging the error.
            mockLogManager.Verify(x => x.LogError(It.IsAny <Exception>(), It.IsAny <string>()));
        }