PrincipalPermissionEntries { void rememberNotAccessControlled(@NotNull String path) { emptyPaths.put(path, null); } PrincipalPermissionEntries();   PrincipalPermissionEntries(long expectedSize);   }
@Test public void testRememberNotAccessControlled() { PrincipalPermissionEntries ppe = new PrincipalPermissionEntries(1); ppe.rememberNotAccessControlled("/path"); assertFalse(ppe.isFullyLoaded()); assertEquals(1, ppe.getSize()); assertTrue(ppe.getEntries().isEmpty()); Collection c = ppe.getEntriesByPath("/path"); assertNotNull(c); assertTrue(c.isEmpty()); }
@Test public void testEmptyPathsWithMaxSize() throws Exception { PrincipalPermissionEntries ppe = new PrincipalPermissionEntries(); assertEquals(0, inspectEmptyPathSize(ppe)); for (int i = 0; i<1010; i++) { ppe.rememberNotAccessControlled("/path" +i); } assertEquals(1000, inspectEmptyPathSize(ppe)); }