CircuitBreakerAspect { public void setCircuitBreakerFactory( CircuitBreakerFactory circuitBreakerFactory) { this.circuitBreakerFactory = circuitBreakerFactory; } CircuitBreakerAspect(); void setCircuitBreakerFactory(
            CircuitBreakerFactory circuitBreakerFactory); CircuitBreakerFactory getCircuitBreakerFactory(); @Around("@annotation(circuitBreakerAnnotation)") Object monitor(final ProceedingJoinPoint pjp,
              CircuitBreaker circuitBreakerAnnotation);  }
@Test public void testSetCircuitBreakerFactory() throws Throwable { ProceedingJoinPoint mockPjp = createPjpMock(mockSignature, 1); expect(mockPjp.proceed()).andReturn(null); replay(mockPjp); CircuitBreakerFactory factory = new CircuitBreakerFactory(); aspect.setCircuitBreakerFactory(factory); aspect.monitor(mockPjp, mockAnnotation); assertSame(factory, aspect.getCircuitBreakerFactory()); verifyBreakerExists(TEST_CIRCUIT_BREAKER); verify(mockPjp); verify(mockAnnotation); verify(mockSignature); }