PerformanceMonitorAspect { public void setPerformanceMonitorFactory( PerformanceMonitorFactory performanceMonitorFactory) { this.performanceMonitorFactory = performanceMonitorFactory; } PerformanceMonitorAspect(); void setPerformanceMonitorFactory(
            PerformanceMonitorFactory performanceMonitorFactory); PerformanceMonitorFactory getPerformanceMonitorFactory(); @Around("@annotation(performanceMonitorAnnotation)") Object monitor(final ProceedingJoinPoint pjp,
            PerformanceMonitor performanceMonitorAnnotation);  }
@Test public void testSetPerformanceMonitorFactory() throws Throwable { ProceedingJoinPoint mockPjp = createPjpMock(mockSignature, 1); expect(mockPjp.proceed()).andReturn(null); replay(mockPjp); PerformanceMonitorFactory factory = new PerformanceMonitorFactory(); aspect.setPerformanceMonitorFactory(factory); aspect.monitor(mockPjp, mockAnnotation); assertSame(factory, aspect.getPerformanceMonitorFactory()); verifyMonitor(TEST_MONITOR, 1, 0); verify(mockPjp); verify(mockAnnotation); verify(mockSignature); }