assertNull(_state.getStrategy("service-1", "http"));
// Put degrader into the strategyList, it it not one of the supported strategies in
// this strategyFactory, so we should not get a strategy back for http.
strategyList.add("degrader");
_serviceRegistry.put("service-1", new ServiceProperties("service-1",
"cluster-1",
"/test",
"unusedInThisConstructor",
strategyList,
Collections.<String, Object>emptyMap(),
null,
null,
schemes,
null));
_clusterRegistry.put("cluster-1", new ClusterProperties("cluster-1"));
assertNull(_state.getStrategy("service-1", "http"));
// put the random strategy into the Strategy list, it is one of the supported strategies in the
// strategyFactory for this unit test
strategyList.clear();
strategyList.add("random");
_serviceRegistry.put("service-1", new ServiceProperties("service-1",
"cluster-1",
"/test",
"unusedInThisConstructor",
strategyList,
Collections.<String, Object>emptyMap(),
null,
null,
schemes,
null));
_clusterRegistry.put("cluster-1", new ClusterProperties("cluster-1"));
LoadBalancerStrategy strategy = _state.getStrategy("service-1", "http");
assertNotNull(strategy);
assertTrue(strategy instanceof RandomLoadBalancerStrategy);
// now add the degraderV3 strategy into the Strategy list
strategyList.addFirst("degraderV3");
_serviceRegistry.put("service-1", new ServiceProperties("service-1",
"cluster-1",
"/test",
"unusedInThisConstructor",
strategyList,
Collections.<String, Object>emptyMap(),