/** Utility method for creating {@link HystrixCommandMetrics} for unit tests. */ private static HystrixCommandMetrics getMetrics(HystrixCommandProperties.Setter properties) { return HystrixCommandMetrics.getInstance( CommandKeyForUnitTest.KEY_ONE, CommandOwnerForUnitTest.OWNER_ONE, ThreadPoolKeyForUnitTest.THREAD_POOL_ONE, HystrixCommandPropertiesTest.asMock(properties)); }
/** Utility method for creating {@link HystrixCircuitBreaker} for unit tests. */ private static HystrixCircuitBreaker getCircuitBreaker( HystrixCommandKey key, HystrixCommandGroupKey commandGroup, HystrixCommandMetrics metrics, HystrixCommandProperties.Setter properties) { return new HystrixCircuitBreakerImpl( key, commandGroup, HystrixCommandPropertiesTest.asMock(properties), metrics); }