Implement a Circuit Breaker pattern in code. The circuit breaker wraps calls to an external service (simulated via a lambda/Supplier that returns success or failure) and manages state transitions among three states: CLOSED (normal operation), OPEN (failing fast / rejecting requests), and HALF_OPEN (testing recovery). Key behaviors: (1) In CLOSED…