QueueCircuitBreakerConfigurationResourceManager implements LoggableResource { public QueueCircuitBreakerConfigurationResource getConfigurationResource() { if (configurationResource == null) { configurationResource = new QueueCircuitBreakerConfigurationResource(); } return configurationResource; } QueueCircuitBreakerConfigurationResourceManager(Vertx vertx, ResourceStorage storage, String circuitBreakerConfigUri); QueueCircuitBreakerConfigurationResource getConfigurationResource(); @Override void enableResourceLogging(boolean resourceLoggingEnabled); void addRefreshable(Refreshable refreshable); boolean handleConfigurationResource(final HttpServerRequest request);  }
@Test public void testDefaultConfigValues(TestContext context){ QueueCircuitBreakerConfigurationResourceManager manager = new QueueCircuitBreakerConfigurationResourceManager(vertx, new MockResourceStorage(), CONFIGURATION_URI); QueueCircuitBreakerConfigurationResource config = manager.getConfigurationResource(); context.assertFalse(config.isCircuitCheckEnabled()); context.assertFalse(config.isStatisticsUpdateEnabled()); context.assertEquals(90, config.getErrorThresholdPercentage()); context.assertEquals(86400000, config.getEntriesMaxAgeMS()); context.assertEquals(100, config.getMinQueueSampleCount()); context.assertEquals(5000, config.getMaxQueueSampleCount()); context.assertFalse(config.isOpenToHalfOpenTaskEnabled()); context.assertEquals(120000, config.getOpenToHalfOpenTaskInterval()); context.assertFalse(config.isUnlockQueuesTaskEnabled()); context.assertEquals(10000, config.getUnlockQueuesTaskInterval()); context.assertFalse(config.isUnlockSampleQueuesTaskEnabled()); context.assertEquals(120000, config.getUnlockSampleQueuesTaskInterval()); }