public async Task FetchAddressBookAsync_ShouldBeOkObjectResult()
        {
            // Arrange
            var user = new User
            {
                Id = Guid.NewGuid()
            };

            var address = new Address(
                UserId.FromGuid(user.Id),
                Country.Canada,
                "Line1",
                null,
                "City",
                "State",
                "PostalCode");

            var addressBook = new List <Address>
            {
                address
            };

            TestMock.UserService.Setup(userManager => userManager.GetUserAsync(It.IsAny <ClaimsPrincipal>())).ReturnsAsync(user).Verifiable();

            TestMock.AddressService.Setup(addressService => addressService.FetchAddressBookAsync(It.IsAny <User>())).ReturnsAsync(addressBook).Verifiable();

            var controller = new AddressBookController(TestMock.UserService.Object, TestMock.AddressService.Object, TestMapper);

            // Act
            var result = await controller.FetchAddressBookAsync();

            // Assert
            result.Should().BeOfType <OkObjectResult>();

            result.As <OkObjectResult>().Value.Should().BeEquivalentTo(TestMapper.Map <ICollection <AddressDto> >(addressBook));

            TestMock.UserService.Verify(userManager => userManager.GetUserAsync(It.IsAny <ClaimsPrincipal>()), Times.Once);

            TestMock.AddressService.Verify(addressService => addressService.FetchAddressBookAsync(It.IsAny <User>()), Times.Once);
        }
        public async Task FetchAddressBookAsync_ShouldBeNoContentResult()
        {
            // Arrange
            var user = new User();

            TestMock.UserService.Setup(userManager => userManager.GetUserAsync(It.IsNotNull <ClaimsPrincipal>())).ReturnsAsync(user).Verifiable();

            TestMock.AddressService.Setup(addressService => addressService.FetchAddressBookAsync(It.IsAny <User>()))
            .ReturnsAsync(new Collection <Address>())
            .Verifiable();

            var controller = new AddressBookController(TestMock.UserService.Object, TestMock.AddressService.Object, TestMapper);

            // Act
            var result = await controller.FetchAddressBookAsync();

            // Assert
            result.Should().BeOfType <NoContentResult>();

            TestMock.UserService.Verify(userManager => userManager.GetUserAsync(It.IsAny <ClaimsPrincipal>()), Times.Once);

            TestMock.AddressService.Verify(addressService => addressService.FetchAddressBookAsync(It.IsAny <User>()), Times.Once);
        }