// for unit testing, this allows the strategy to be forced for the next time updateState // is called. This is not to be used in prod code. void setStrategy(DegraderLoadBalancerState.Strategy strategy) { DegraderLoadBalancerState newState; newState = new DegraderLoadBalancerState( _state.getUpdateIntervalMs(), _state.getClusterGenerationId(), _state.getPointsMap(), _state.getLastUpdated(), strategy, _state.getCurrentOverrideDropRate(), _state.getCurrentAvgClusterLatency(), _state.isInitialized(), _state.getRecoveryMap(), _state.getServiceName(), _state.getDegraderProperties(), _state.getCurrentClusterCallCount()); _state = newState; }