@Test public void util_newHealthCheckingLoadBalancer() { Factory hcFactory = new Factory() { @Override public LoadBalancer newLoadBalancer(Helper helper) { return HealthCheckingLoadBalancerUtil.newHealthCheckingLoadBalancer( origLbFactory, helper); } }; wrappedHelper = null; hcLb = hcFactory.newLoadBalancer(origHelper); Attributes resolutionAttrs = attrsWithHealthCheckService("BarService"); hcLbEventDelivery.handleResolvedAddressGroups(resolvedAddressList, resolutionAttrs); verify(origLb).handleResolvedAddressGroups(same(resolvedAddressList), same(resolutionAttrs)); createSubchannel(0, Attributes.EMPTY); assertThat(healthImpls[0].calls).isEmpty(); hcLbEventDelivery.handleSubchannelState( subchannels[0], ConnectivityStateInfo.forNonError(READY)); assertThat(healthImpls[0].calls).hasSize(1); }
@Override public LoadBalancer newLoadBalancer(Helper helper) { HelperImpl wrappedHelper = new HelperImpl(helper); LoadBalancer delegateBalancer = delegateFactory.newLoadBalancer(wrappedHelper); wrappedHelper.init(delegateBalancer); return new LoadBalancerImpl(wrappedHelper, delegateBalancer); }
HealthCheckingLoadBalancerFactory extends Factory { @Override public LoadBalancer newLoadBalancer(Helper helper) { HelperImpl wrappedHelper = new HelperImpl(helper); LoadBalancer delegateBalancer = delegateFactory.newLoadBalancer(wrappedHelper); wrappedHelper.init(delegateBalancer); return new LoadBalancerImpl(wrappedHelper, delegateBalancer); } }
HealthCheckingLoadBalancerFactory extends Factory { @Override public LoadBalancer newLoadBalancer(Helper helper) { HelperImpl wrappedHelper = new HelperImpl(helper); LoadBalancer delegateBalancer = delegateFactory.newLoadBalancer(wrappedHelper); wrappedHelper.init(delegateBalancer); return new LoadBalancerImpl(wrappedHelper, delegateBalancer); } HealthCheckingLoadBalancerFactory(
      Factory delegateFactory, BackoffPolicy.Provider backoffPolicyProvider, TimeProvider time); }
HealthCheckingLoadBalancerFactory extends Factory { @Override public LoadBalancer newLoadBalancer(Helper helper) { HelperImpl wrappedHelper = new HelperImpl(helper); LoadBalancer delegateBalancer = delegateFactory.newLoadBalancer(wrappedHelper); wrappedHelper.init(delegateBalancer); return new LoadBalancerImpl(wrappedHelper, delegateBalancer); } HealthCheckingLoadBalancerFactory(
      Factory delegateFactory, BackoffPolicy.Provider backoffPolicyProvider, TimeProvider time); @Override LoadBalancer newLoadBalancer(Helper helper); }
HealthCheckingLoadBalancerFactory extends Factory { @Override public LoadBalancer newLoadBalancer(Helper helper) { HelperImpl wrappedHelper = new HelperImpl(helper); LoadBalancer delegateBalancer = delegateFactory.newLoadBalancer(wrappedHelper); wrappedHelper.init(delegateBalancer); return new LoadBalancerImpl(wrappedHelper, delegateBalancer); } HealthCheckingLoadBalancerFactory(
      Factory delegateFactory, BackoffPolicy.Provider backoffPolicyProvider, TimeProvider time); @Override LoadBalancer newLoadBalancer(Helper helper);  }