static async Task Main(string[] args)
        {
            ServiceCollection services = new ServiceCollection();

            IConfiguration configuration = new ConfigurationBuilder()
                                           .SetBasePath(Directory.GetCurrentDirectory())
                                           .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
                                           .Build();

            AddPidPlugin(services, configuration);

            ServiceProvider serviceProvider =
                services.BuildServiceProvider();

            var pidPluginClient = serviceProvider.GetService <IPidPluginClient>();

            try
            {
                string cuit = "cuit-number-here";

                CancellationToken cancellationToken = CancellationToken.None;

                EntityBasicData entityBasicDataResponse = await pidPluginClient
                                                          .GetEntityDataBasicAsync(cuit, cancellationToken);

                Console.WriteLine(JsonConvert.SerializeObject(entityBasicDataResponse, Formatting.Indented));
            }
            catch (Exception ex)
            {
                Console.WriteLine($"[{ex.GetType().Name}] {ex.Message}");
            }
        }
            public async Task Should_cache_response_when_response_is_successful()
            {
                // arrange

                string            cuit = "5050505050";
                CancellationToken cancellationToken = CancellationToken.None;

                EntityBasicData expected = new EntityBasicData()
                {
                    NaturalKey = 56
                };

                string url = $"EntityDataFull?key={cuit}";

                object value = null;

                this.CacheAccessorMock
                .Setup(x => x.TryGetValue(It.Is <string>(u => u.ToString() == url), out value))
                .Returns(false);

                this.HttpMessageHandlerMock
                .Protected()
                .Setup <Task <HttpResponseMessage> >("SendAsync", ItExpr.IsAny <HttpRequestMessage>(), ItExpr.IsAny <CancellationToken>())
                .ReturnsAsync(new HttpResponseMessage(HttpStatusCode.OK)
                {
                    Content = new StringContent(JsonConvert.SerializeObject(expected))
                });

                // act

                var actual = await this.Sut.GetEntityDataFullAsync(cuit, cancellationToken);

                // assert

                actual.Should().BeEquivalentTo(expected);

                this.HttpMessageHandlerMock
                .Protected()
                .Verify(
                    "SendAsync",
                    Times.Once(),
                    ItExpr.IsAny <HttpRequestMessage>(),
                    ItExpr.IsAny <CancellationToken>()
                    );

                this.CacheAccessorMock.Verify(
                    x => x.Set(
                        It.Is <string>(p => p == url),
                        It.IsAny <object>(),
                        this.CacheOptions.Value.EntityDataBasicExpiration
                        ),
                    Times.Once()
                    );
            }
            public async Task Should_not_call_http_client_if_response_is_cached()
            {
                // arrange

                string            cuit = "5050505050";
                CancellationToken cancellationToken = CancellationToken.None;

                EntityBasicData expected = new EntityBasicData()
                {
                    NaturalKey = 56
                };

                string url = $"EntityDataBasic?key={cuit}";

                object value = expected;

                this.CacheAccessorMock
                .Setup(x => x.TryGetValue(It.Is <string>(u => u.ToString() == url), out value))
                .Returns(true);

                // act

                var actual = await this.Sut.GetEntityDataBasicAsync(cuit, cancellationToken);

                // assert

                actual.Should().BeEquivalentTo(expected);

                this.HttpMessageHandlerMock
                .Protected()
                .Verify(
                    "SendAsync",
                    Times.Never(),
                    ItExpr.IsAny <HttpRequestMessage>(),
                    ItExpr.IsAny <CancellationToken>()
                    );

                this.CacheAccessorMock.Verify(
                    x => x.TryGetValue(
                        It.IsAny <string>(),
                        out value
                        ),
                    Times.Once()
                    );
            }
            public async Task Should_call_http_client_with_correct_url_if_response_is_not_cached()
            {
                // arrange

                string            cuit = "5050505050";
                CancellationToken cancellationToken = CancellationToken.None;

                EntityBasicData expected = new EntityBasicData()
                {
                    NaturalKey = 56
                };

                string url = $"EntityDataFull?key={cuit}";

                Uri expectedUri = new Uri($"{this.HttpClient.BaseAddress}{url}");

                this.HttpMessageHandlerMock
                .Protected()
                .Setup <Task <HttpResponseMessage> >("SendAsync", ItExpr.IsAny <HttpRequestMessage>(), ItExpr.IsAny <CancellationToken>())
                .ReturnsAsync(new HttpResponseMessage(HttpStatusCode.OK)
                {
                    Content = new StringContent(JsonConvert.SerializeObject(expected))
                });

                // act

                var actual = await this.Sut.GetEntityDataFullAsync(cuit, cancellationToken);

                // assert

                actual.Should().BeEquivalentTo(expected);

                this.HttpMessageHandlerMock
                .Protected()
                .Verify(
                    "SendAsync",
                    Times.Once(),
                    ItExpr.Is <HttpRequestMessage>(req => req.Method == HttpMethod.Get && req.RequestUri == expectedUri),
                    ItExpr.IsAny <CancellationToken>()
                    );
            }