CircuitBreakerBuilder { public CircuitBreakerBuilder counterUpdateInterval(Duration counterUpdateInterval) { requireNonNull(counterUpdateInterval, "counterUpdateInterval"); if (counterUpdateInterval.isNegative() || counterUpdateInterval.isZero()) { throw new IllegalArgumentException( "counterUpdateInterval: " + counterUpdateInterval + " (expected: > 0)"); } this.counterUpdateInterval = counterUpdateInterval; return this; } CircuitBreakerBuilder(String name);   CircuitBreakerBuilder(); CircuitBreakerBuilder failureRateThreshold(double failureRateThreshold); CircuitBreakerBuilder minimumRequestThreshold(long minimumRequestThreshold); CircuitBreakerBuilder trialRequestInterval(Duration trialRequestInterval); CircuitBreakerBuilder trialRequestIntervalMillis(long trialRequestIntervalMillis); CircuitBreakerBuilder circuitOpenWindow(Duration circuitOpenWindow); CircuitBreakerBuilder circuitOpenWindowMillis(long circuitOpenWindowMillis); CircuitBreakerBuilder counterSlidingWindow(Duration counterSlidingWindow); CircuitBreakerBuilder counterSlidingWindowMillis(long counterSlidingWindowMillis); CircuitBreakerBuilder counterUpdateInterval(Duration counterUpdateInterval); CircuitBreakerBuilder counterUpdateIntervalMillis(long counterUpdateIntervalMillis); CircuitBreakerBuilder listener(CircuitBreakerListener listener); CircuitBreaker build();  }
@Test void testCounterUpdateInterval() { final CircuitBreakerConfig config = confOf(builder().counterUpdateInterval(oneSecond).build()); assertThat(config.counterUpdateInterval()).isEqualTo(oneSecond); }