CircuitBreakerDelegate implements CircuitBreaker<ET> { @Override public String getId() { return delegate.getId(); } CircuitBreakerDelegate(CircuitBreaker<Del_ET> delegate, Function<ET, Del_ET> eventConverter); @Override ManualModeTask<ET> newManualModeTask(); @Override CompletableFuture<ET> executeAsyncCall(Supplier<CompletableFuture<ET>> eventFutureSupplier); @Override ET executeBlockingCall(Callable<ET> eventSupplier); @Override CircuitBreakerDelegate<ET, Del_ET> onClose(Runnable listener); @Override CircuitBreakerDelegate<ET, Del_ET> onHalfOpen(Runnable listener); @Override CircuitBreakerDelegate<ET, Del_ET> onOpen(Runnable listener); @Override String getId();  }
@Test public void getId_calls_delegate() { String generatedId = UUID.randomUUID().toString(); when(delegateMock.getId()).thenReturn(generatedId); String id = wrapper.getId(); assertThat(id).isEqualTo(generatedId); verify(delegateMock).getId(); }