@Test
public void testViewPermissionGrantedForSearchResultButDeniedForParentFolder()
	throws Exception {

	List<TermCollector> termCollectors = addFoldersAndCreateTermCollectors(
		"zeroFolderId", null, "null", "", "   ", "assert", "volatile",
		"alpha");
	setUpMultipleTermCollectors(termCollectors);
	FolderSearchFacetDisplayContext folderSearchFacetDisplayContext =
		createDisplayContext(null);
	List<FolderSearchFacetTermDisplayContext>
		folderSearchFacetTermDisplayContexts =
			folderSearchFacetDisplayContext.
				getFolderSearchFacetTermDisplayContexts();
	String nameFrequencyString = buildNameFrequencyString(
		folderSearchFacetTermDisplayContexts);
	Assert.assertEquals(
		folderSearchFacetTermDisplayContexts.toString(),
		"assert:6|volatile:7|alpha:8", nameFrequencyString);
	Assert.assertEquals(
		termCollectors.toString(), 36,
		getTotalTermCollectorFrequencyCount(termCollectors));
	Assert.assertEquals(
		folderSearchFacetTermDisplayContexts.toString(), 21,
		getTotalFolderSearchFacetTermDisplayContextFrequencyCount(
			folderSearchFacetTermDisplayContexts));
}