TestConfiguration.sharepointUrl);
globalState = TestConfiguration.initState(sharepointClientContext);
}
public void testGetAclForUrls() throws Exception {
WebState webState = globalState.lookupWeb(TestConfiguration.Site1_URL, sharepointClientContext);
ListState listState = globalState.lookupList(TestConfiguration.Site1_URL, TestConfiguration.Site1_List1_GUID);
assertNotNull(listState);
List<SPDocument> testDocs = listState.getCrawlQueue();
assertNotNull(testDocs);
// SharePoint document representing list
SPDocument spdocument = listState.getDocumentInstance(FeedType.CONTENT_FEED);
testDocs.add(spdocument);
// SharePoint document representing site landing page(site)
final SPDocument spdocument2 = siteData.getSiteData(webState);
testDocs.add(spdocument2);
SPDocumentList docList = new SPDocumentList(testDocs, globalState);
assertNotNull(docList);
aclHelper = new AclHelper(sharepointClientContext, webState.getWebUrl());
aclHelper.fetchAclForDocuments(docList, webState);
for (SPDocument document : docList.getDocuments()) {
assertNotNull(document);
assertNotNull(document.getAclUsers());
assertNotNull(document.getAclGroups());