public void testOnlyPersistsChangedRole() {
ObservableDocument doc = BasicFactories.observableDocumentProvider().parse("");
DocumentBasedRoles permissions = DocumentBasedRoles.create(doc);
permissions.assign(p("public@a.gwave.com"), Role.READ_ONLY);
assertEquals("<assign address=\"public@a.gwave.com\" role=\"READ_ONLY\"/>", doc.toXmlString());
}
public void testPersistNothingWhenSettingDefaultRole() {
ObservableDocument doc = BasicFactories.observableDocumentProvider().parse("");
DocumentBasedRoles permissions = DocumentBasedRoles.create(doc);