CircuitBreakerBuilder { public CircuitBreakerBuilder circuitOpenWindow(Duration circuitOpenWindow) { requireNonNull(circuitOpenWindow, "circuitOpenWindow"); if (circuitOpenWindow.isNegative() || circuitOpenWindow.isZero()) { throw new IllegalArgumentException( "circuitOpenWindow: " + circuitOpenWindow + " (expected: > 0)"); } this.circuitOpenWindow = circuitOpenWindow; 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 testCircuitOpenWindow() { final CircuitBreakerConfig config = confOf(builder().circuitOpenWindow(oneSecond).build()); assertThat(config.circuitOpenWindow()).isEqualTo(oneSecond); }