return opsList.get(opsList.size() - 1);
}
}
protected void assertLifecycleMethodsNotIntercepted(AbstractBean beanInstance) throws Exception {
OperationCollectionAspectSupport aspectInstance = getAspect();
OperationCollector orgCollector = aspectInstance.getCollector();
OperationListCollector collector = new OperationListCollector();
aspectInstance.setCollector(collector);
List<Operation> collectedOps = collector.getCollectedOperations();
try {
beanInstance.afterPropertiesSet();
assertTrue("Unexpected invocation for 'afterPropertiesSet': " + collectedOps, collectedOps.isEmpty());
ApplicationEvent testEvent = new TestEvent(beanInstance);
beanInstance.onApplicationEvent(testEvent);
assertTrue("Unexpected invocation for 'onApplicationEvent': " + collectedOps, collectedOps.isEmpty());
beanInstance.publishEvent(testEvent);
assertTrue("Unexpected invocation for 'publishEvent': " + collectedOps, collectedOps.isEmpty());
beanInstance.multicastEvent(testEvent);
assertTrue("Unexpected invocation for 'multicastEvent': " + collectedOps, collectedOps.isEmpty());
} finally {
aspectInstance.setCollector(orgCollector);
}
}