// check
assertTrue("authorization \"A\" DENIED, expected PERMITTED",checkPolicyEnforcement("A"));
assertFalse(checkPolicyEnforcement("B"));
// purge latest datastream version
Datastream ds = apim.getDatastream(pid, POLICY_DATASTREAM, null);
apim.purgeDatastream(pid, POLICY_DATASTREAM, ds.getCreateDate(), ds.getCreateDate(), "purging latest version", false);
// check reverted back to B in force, A not in force (ie prior version)
assertTrue("authorization \"B\" DENIED, expected PERMITTED",checkPolicyEnforcement("B"));
assertFalse(checkPolicyEnforcement("A"));