public void should_load_balance_request_with_custom_load_balancer()
        {
            var downstreamPortOne       = RandomPortFinder.GetRandomPort();
            var downstreamPortTwo       = RandomPortFinder.GetRandomPort();
            var downstreamServiceOneUrl = $"http://localhost:{downstreamPortOne}";
            var downstreamServiceTwoUrl = $"http://localhost:{downstreamPortTwo}";

            var configuration = new FileConfiguration
            {
                Routes = new List <FileRoute>
                {
                    new FileRoute
                    {
                        DownstreamPathTemplate = "/",
                        DownstreamScheme       = "http",
                        UpstreamPathTemplate   = "/",
                        UpstreamHttpMethod     = new List <string> {
                            "Get"
                        },
                        LoadBalancerOptions = new FileLoadBalancerOptions {
                            Type = nameof(CustomLoadBalancer)
                        },
                        DownstreamHostAndPorts = new List <FileHostAndPort>
                        {
                            new FileHostAndPort
                            {
                                Host = "localhost",
                                Port = downstreamPortOne,
                            },
                            new FileHostAndPort
                            {
                                Host = "localhost",
                                Port = downstreamPortTwo,
                            },
                        },
                    },
                },
                GlobalConfiguration = new FileGlobalConfiguration(),
            };

            Func <IServiceProvider, DownstreamRoute, IServiceDiscoveryProvider, CustomLoadBalancer> loadBalancerFactoryFunc = (serviceProvider, route, serviceDiscoveryProvider) => new CustomLoadBalancer(serviceDiscoveryProvider.Get);

            this.Given(x => x.GivenProductServiceOneIsRunning(downstreamServiceOneUrl, 200))
            .And(x => x.GivenProductServiceTwoIsRunning(downstreamServiceTwoUrl, 200))
            .And(x => _steps.GivenThereIsAConfiguration(configuration))
            .And(x => _steps.GivenOcelotIsRunningWithCustomLoadBalancer(loadBalancerFactoryFunc))
            .When(x => _steps.WhenIGetUrlOnTheApiGatewayMultipleTimes("/", 50))
            .Then(x => x.ThenTheTwoServicesShouldHaveBeenCalledTimes(50))
            .And(x => x.ThenBothServicesCalledRealisticAmountOfTimes(24, 26))
            .BDDfy();
        }