String baseName, JndiTestContext context, ContextOperationExecutor executor)
throws Exception {
OperationCollectionAspectSupport aspectInstance = getAspect();
OperationCollector collector = aspectInstance.getCollector();
try {
OperationListCollector testCollector = new OperationListCollector();
aspectInstance.setCollector(testCollector);
for (String suffix : JndiResourceCollectionFilter.DEFAULT_EXCLUSION_PATTERNS) {
String name = getClass().getSimpleName()
+ "/"
+ ((suffix.charAt(0) == '.') ? (baseName + suffix) : suffix);
executor.executeContextOperation(context, name, suffix);
Collection<Operation> opsList = testCollector.getCollectedOperations();
assertEquals(baseName + "[" + suffix + "] unexpected operations: " + opsList, 0, ListUtil.size(opsList));
}
} finally {
aspectInstance.setCollector(collector);
}