for (ModelNode addOp : list) {
PathAddress addr = PathAddress.pathAddress(addOp.require(ModelDescriptionConstants.OP_ADDR));
if (addr.size() == 2 && addr.getLastElement().getKey().equals(NamingSubsystemModel.BINDING) && BindingType.forName(addOp.get(NamingBindingResourceDefinition.BINDING_TYPE.getName()).asString()) != BindingType.EXTERNAL_CONTEXT) {
//Add the cache attribute and make sure it fails
addOp.get(NamingBindingResourceDefinition.CACHE.getName()).set(true);
services.executeForFailure(addOp);
//Remove the cache attribute and make sure it succeeds
addOp.remove(NamingBindingResourceDefinition.CACHE.getName());
ModelTestUtils.checkOutcome(services.executeOperation(addOp));