CircuitBreakerBeanFactory extends CircuitBreakerFactory implements InitializingBean { public void buildAnnotatedCircuitBreakers() { if (packageScanBase != null) { AnnotatedMethodScanner methodScanner = new AnnotatedMethodScanner(); for (Method m : methodScanner.findAnnotatedMethods(packageScanBase, org.fishwife.jrugged.aspects.CircuitBreaker.class)) { org.fishwife.jrugged.aspects.CircuitBreaker circuitBreakerAnnotation = m.getAnnotation(org.fishwife.jrugged.aspects.CircuitBreaker.class); DefaultFailureInterpreter dfi = new DefaultFailureInterpreter(circuitBreakerAnnotation.ignore(), circuitBreakerAnnotation.limit(), circuitBreakerAnnotation.windowMillis()); CircuitBreakerConfig config = new CircuitBreakerConfig(circuitBreakerAnnotation.resetMillis(), dfi); createCircuitBreaker(circuitBreakerAnnotation.name(), config); } } }  void afterPropertiesSet(); @Deprecated void setMBeanExporter(MBeanExporter mBeanExporter); void setMBeanExportOperations(MBeanExportOperations mBeanExportOperations); void setPackageScanBase(String packageScanBase); void buildAnnotatedCircuitBreakers(); synchronized CircuitBreaker createCircuitBreaker(String name, CircuitBreakerConfig config); CircuitBreakerBean findCircuitBreakerBean(String name);  }
@Test public void testWhenPackageScanNotProvidedAnnotationsNotLoaded() { factory.buildAnnotatedCircuitBreakers(); assertNull(factory.findCircuitBreaker("breakerA")); assertNull(factory.findCircuitBreaker("breakerB")); }