}
private NotesDocumentMock createNotesDocument(String server, String replicaid,
String unid, ActionType actionType) throws Exception {
String docid = "http://" + server + "/" + replicaid + "/0/" + unid;
NotesDocumentMock doc = new NotesDocumentMock();
doc.addItem(new NotesItemMock("name", NCCONST.ITM_ACTION, "type",
NotesItem.TEXT, "values", actionType));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_DOCID, "type",
NotesItem.TEXT, "values", docid));
doc.addItem(new NotesItemMock("name", NCCONST.NCITM_REPLICAID,
"type", NotesItem.TEXT, "values", replicaid));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_MIMETYPE,
"type", NotesItem.TEXT, "values", "text/plain"));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_ISPUBLIC,
"type", NotesItem.TEXT, "values", "false"));
doc.addItem(new NotesItemMock("name", NCCONST.NCITM_DOCAUTHORREADERS,
"type", NotesItem.READERS, "values", "[reader]"));
doc.addItem(new NotesItemMock("name", NCCONST.NCITM_AUTHTYPE,
"type", NotesItem.TEXT, "values", NCCONST.AUTH_ACL));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_TITLE,
"type", NotesItem.TEXT, "values", "Test document with readers"));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETADESCRIPTION,
"type", NotesItem.TEXT, "values",
"Test parent groups with [reader] role"));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_CONTENT,
"type", NotesItem.TEXT, "values",
"Test parent groups with [reader] role where [reader] is in the readers field"));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETADATABASE,
"type", NotesItem.TEXT, "values", "Database Title"));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETACATEGORIES,
"type", NotesItem.TEXT, "values", "Category 1"));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAREPLICASERVERS,
"type", NotesItem.TEXT, "values", server));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETANOTESLINK,
"type", NotesItem.TEXT, "values",
"notes://" + server + "/" + replicaid));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAWRITERNAME,
"type", NotesItem.TEXT, "values", "Walt Disney"));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAFORM,
"type", NotesItem.TEXT, "values", "Discussion"));
Date d = new Date();
doc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETALASTUPDATE,
"type", NotesItem.TEXT, "values", d));
doc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETACREATEDATE,
"type", NotesItem.TEXT, "values", d));
return doc;
}