FixedThreadPoolBulkhead implements ThreadPoolBulkhead { @Override public ThreadPoolBulkheadConfig getBulkheadConfig() { return config; } FixedThreadPoolBulkhead(String name, @Nullable ThreadPoolBulkheadConfig bulkheadConfig);  FixedThreadPoolBulkhead(String name, @Nullable ThreadPoolBulkheadConfig bulkheadConfig,
        Map<String, String> tags);  FixedThreadPoolBulkhead(String name);  FixedThreadPoolBulkhead(String name, Map<String, String> tags);  FixedThreadPoolBulkhead(String name, Supplier<ThreadPoolBulkheadConfig> configSupplier);  FixedThreadPoolBulkhead(String name, Supplier<ThreadPoolBulkheadConfig> configSupplier,
        Map<String, String> tags); @Override CompletableFuture<T> submit(Callable<T> callable); @Override CompletableFuture<Void> submit(Runnable runnable); @Override String getName(); @Override ThreadPoolBulkheadConfig getBulkheadConfig(); @Override Metrics getMetrics(); @Override Map<String, String> getTags(); @Override ThreadPoolBulkheadEventPublisher getEventPublisher(); @Override String toString(); @Override void close();  }
@Test public void testCustomSettings() { assertThat(bulkhead.getBulkheadConfig().getMaxThreadPoolSize()).isEqualTo(2); assertThat(bulkhead.getBulkheadConfig().getQueueCapacity()).isEqualTo(10); assertThat(bulkhead.getBulkheadConfig().getCoreThreadPoolSize()).isEqualTo(1); assertThat(bulkhead.getBulkheadConfig().getKeepAliveDuration()) .isEqualTo(Duration.ofMillis(10)); }
@Test public void testCreateWithDefaults() { ThreadPoolBulkhead bulkhead = ThreadPoolBulkhead.ofDefaults("test"); assertThat(bulkhead).isNotNull(); assertThat(bulkhead.getBulkheadConfig()).isNotNull(); assertThat(bulkhead.getBulkheadConfig().getMaxThreadPoolSize()) .isEqualTo(ThreadPoolBulkheadConfig.DEFAULT_MAX_THREAD_POOL_SIZE); assertThat(bulkhead.getBulkheadConfig().getCoreThreadPoolSize()) .isEqualTo(ThreadPoolBulkheadConfig.DEFAULT_CORE_THREAD_POOL_SIZE); assertThat(bulkhead.getBulkheadConfig().getQueueCapacity()) .isEqualTo(ThreadPoolBulkheadConfig.DEFAULT_QUEUE_CAPACITY); }