ModelNode add = Util.createAddOperation(PathAddress.pathAddress(PATH));
add.get("discard").setExpression("${xxx}");
OperationTransformer.TransformedOperation transformedAdd = transformOperation(add);
Assert.assertFalse(transformedAdd.rejectOperation(success()));
Assert.assertEquals(add, transformedAdd.getTransformedOperation());
<BUG>ModelNode write = Util.getWriteAttributeOperation(PathAddress.pathAddress(PATH), "discard", new ModelNode().setExpression("${xxx}"));

OperationTransformer.TransformedOperation transformedWrite = transformOperation(write);
Assert.assertFalse(transformedWrite.rejectOperation(success()));
Assert.assertEquals(write, transformedWrite.getTransformedOperation());</BUG>
}

ModelNode add = Util.createAddOperation(PathAddress.pathAddress(PATH));
add.get("discard").set("nothing");
add.get("keep").set("here");
OperationTransformer.TransformedOperation transformedAdd = transformOperation(add);
Assert.assertFalse(transformedAdd.rejectOperation(success()));
Assert.assertTrue(transformedAdd.getTransformedOperation().hasDefined("keep"));
Assert.assertFalse(transformedAdd.getTransformedOperation().has("discard"));
checkWriteOpDiscarded(Util.getWriteAttributeOperation(PathAddress.pathAddress(PATH), "discard", new ModelNode("nothing")));
}
