SemaphoreBulkhead implements Bulkhead { @Override public boolean tryAcquirePermission() { boolean callPermitted = tryEnterBulkhead(); publishBulkheadEvent( () -> callPermitted ? new BulkheadOnCallPermittedEvent(name) : new BulkheadOnCallRejectedEvent(name) ); return callPermitted; } SemaphoreBulkhead(String name, @Nullable BulkheadConfig bulkheadConfig);  SemaphoreBulkhead(String name, @Nullable BulkheadConfig bulkheadConfig,
        Map<String, String> tags);  SemaphoreBulkhead(String name);  SemaphoreBulkhead(String name, Supplier<BulkheadConfig> configSupplier);  SemaphoreBulkhead(String name, Supplier<BulkheadConfig> configSupplier,
        Map<String, String> tags); @Override void changeConfig(final BulkheadConfig newConfig); @Override boolean tryAcquirePermission(); @Override void acquirePermission(); @Override void releasePermission(); @Override void onComplete(); @Override String getName(); @Override BulkheadConfig getBulkheadConfig(); @Override Metrics getMetrics(); @Override Map<String, String> getTags(); @Override EventPublisher getEventPublisher(); @Override String toString();  }
@Test public void testZeroMaxConcurrentCalls() { BulkheadConfig config = BulkheadConfig.custom() .maxConcurrentCalls(0) .maxWaitDuration(Duration.ofMillis(0)) .build(); SemaphoreBulkhead bulkhead = new SemaphoreBulkhead("test", config); boolean entered = bulkhead.tryAcquirePermission(); assertThat(entered).isFalse(); }