public async Task CreateNewAsync_ShouldCreateEntity_WhenFactoryMethodIsGiven()
        {
            // Arrange
            const int id = 17;

            var subject = new AsyncEntityFactory <FakeEntity <int>, int>(() => Task.FromResult(id));

            // Act
            var result = await subject.CreateNewAsync().ConfigureAwait(false);

            // Assert
            result.Should().NotBeNull();
            result.Id.Should().Be(id);
        }
        public async Task CreateNewAsync_ShouldCreateEntity_WhenAbstractFactoryIsGiven()
        {
            // Arrange
            const int id = 17;

            var mockFactory = new Mock <IAsyncFactory <int> >(MockBehavior.Strict);

            mockFactory
            .Setup(f => f.CreateNewAsync())
            .ReturnsAsync(id);

            var subject = new AsyncEntityFactory <FakeEntity <int>, int>(mockFactory.Object);

            // Act
            var result = await subject.CreateNewAsync().ConfigureAwait(false);

            // Assert
            result.Should().NotBeNull();
            result.Id.Should().Be(id);

            mockFactory.VerifyAll();
        }