NotesDatabaseMock notesDatabase = new NotesDatabaseMock(
"JediServer", "JediTrainingManuals.nsf", "jtmreplicaid0123");
((NotesSessionMock) session).addDatabase(notesDatabase);
NotesACLMock acl = new NotesACLMock();
acl.addAclEntry(new NotesACLEntryMock(
"cn=Ahsoka Tano/ou=Tests/o=Tests", NotesACLEntry.TYPE_PERSON,
NotesACL.LEVEL_READER, "[student]"));
acl.addAclEntry(new NotesACLEntryMock(
"cn=Anakin Skywalker/ou=Tests/o=Tests", NotesACLEntry.TYPE_PERSON,
NotesACL.LEVEL_AUTHOR, "[tacticsexpert]"));
acl.addAclEntry(new NotesACLEntryMock(
"cn=Yoda/ou=Tests/o=Tests", NotesACLEntry.TYPE_PERSON,
NotesACL.LEVEL_AUTHOR, "[philosopher]"));
acl.addAclEntry(new NotesACLEntryMock("masters",
NotesACLEntry.TYPE_PERSON_GROUP, NotesACL.LEVEL_AUTHOR,
"[holderofopinions]", "[duplicategroupname]"));
acl.addAclEntry(new NotesACLEntryMock("bad guys",
NotesACLEntry.TYPE_PERSON_GROUP, NotesACL.LEVEL_NOACCESS));
notesDatabase.setACL(acl);
notesDatabase = new NotesDatabaseMock(
"SenateServer", "SenateExpenseReports.nsf", "serreplicaid0123");
((NotesSessionMock) session).addDatabase(notesDatabase);
acl = new NotesACLMock();
acl.addAclEntry(new NotesACLEntryMock(
"cn=Chancellor Palpatine/ou=Tests/o=Tests",
NotesACLEntry.TYPE_PERSON, NotesACL.LEVEL_READER,
"[removablerole]"));
acl.addAclEntry(new NotesACLEntryMock("senators",
NotesACLEntry.TYPE_PERSON_GROUP, NotesACL.LEVEL_AUTHOR,
"[creator]", "[duplicategroupname]"));
notesDatabase.setACL(acl);
notesDatabase = new NotesDatabaseMock(
"SenateServer", "EvilSeparatistPlots.nsf", "espreplicaid0123");
((NotesSessionMock) session).addDatabase(notesDatabase);
acl = new NotesACLMock();
acl.addAclEntry(new NotesACLEntryMock(
"cn=Chancellor Palpatine/ou=Tests/o=Tests",
NotesACLEntry.TYPE_PERSON, NotesACL.LEVEL_MANAGER,
"[evilmastermind]"));
acl.addAclEntry(new NotesACLEntryMock(
"Count Dooku", // Test a short name in the ACL
NotesACLEntry.TYPE_PERSON, NotesACL.LEVEL_AUTHOR,
"[henchman]"));
acl.addAclEntry(new NotesACLEntryMock(
"bad guys", NotesACLEntry.TYPE_PERSON_GROUP,
NotesACL.LEVEL_READER));
acl.addAclEntry(new NotesACLEntryMock("jedi",
NotesACLEntry.TYPE_PERSON_GROUP,
NotesACL.LEVEL_READER, "[reader]"));
notesDatabase.setACL(acl);
try {