for(Resource res : resources) {
assertFalse(res.getResourceKey().startsWith(UPGRADED_RESOURCE_KEY_PREFIX), "Resource " + res
+ " seems to be upgraded even though it shouldn't.");
InventoryManager im = PluginContainer.getInstance().getInventoryManager();
ResourceContainer rc = im.getResourceContainer(res);
assertEquals(rc.getResourceComponentState(), ResourceContainer.ResourceComponentState.STOPPED,
"A resource that has not been upgraded due to upgrade error in parent should be stopped.");
//recurse, since the whole subtree under the failed resource should be not upgraded and stopped.
Set<Resource> children = im.getContainerChildren(res, rc);
checkResourcesNotUpgraded(children, children.size());