schemes,
null));
assertNotNull(_state.getStrategy("service-1", "http"));
LoadBalancerStrategy strategy = _state.getStrategy("service-1", "http");
assertNotNull(strategy);
assertTrue(strategy instanceof RandomLoadBalancerStrategy);
// check that we're getting the exact same strategy (by pointer) every time
assertTrue(strategy == _state.getStrategy("service-1", "http"));
assertTrue(strategy == _state.getStrategy("service-1", "http"));
// now make sure adding a cluster property won't change the strategy
_clusterRegistry.put("cluster-1", new ClusterProperties("cluster-1"));
// we should still have the same strategy now
LoadBalancerStrategy newStrategy = _state.getStrategy("service-1", "http");
assertNotNull(newStrategy);
assertTrue(strategy == newStrategy);
assertTrue(newStrategy instanceof RandomLoadBalancerStrategy);
strategy = newStrategy;