CircuitBreakerFactory { public Set<String> getCircuitBreakerNames() { return circuitBreakerMap.keySet(); }  synchronized CircuitBreaker createCircuitBreaker(String name,
            CircuitBreakerConfig config); void setProperties(Properties properties); CircuitBreaker findCircuitBreaker(String name); Set<String> getCircuitBreakerNames(); static final String CONFIG_KEY_PREFIX; static final String LIMIT_KEY; static final String WINDOWMILLIS_KEY; static final String RESETMILLIS_KEY; }
@Test public void testGetCircuitBreakerNames() { Set<String> testSet = new HashSet<String>(); testSet.add("one"); testSet.add("two"); testSet.add("three"); testSet.add("four"); factory.createCircuitBreaker("one", config); factory.createCircuitBreaker("two", config); factory.createCircuitBreaker("three", config); factory.createCircuitBreaker("four", config); Set<String> monitorNames = factory.getCircuitBreakerNames(); assertEquals(testSet, monitorNames); }