@Test
public void testAccessToLayerGroup() throws Exception {
CatalogFilterAccessManager mgr = setupAccessManager();
SecureCatalogImpl sc = new SecureCatalogImpl(catalog, mgr) {};
assertEquals(3, sc.getLayerGroups().size());
WorkspaceInfo ws = sc.getWorkspaceByName("topp");
LocalWorkspace.set(ws);
assertEquals(3, sc.getLayerGroups().size());
LocalWorkspace.remove();
ws = sc.getWorkspaceByName("nurc");
LocalWorkspace.set(ws);
assertEquals(1, sc.getLayerGroups().size());
assertEquals("layerGroup", sc.getLayerGroups().get(0).getName());
LocalWorkspace.remove();
}