}
public void testPage() throws Exception
{
Site testPortal = session.getWorkspace().getSite(ObjectType.PORTAL_SITE, "test");
Page testRootPage = testPortal.getRootPage();
Page pages = testRootPage.getChild("pages");
Page testPage = pages.getChild("test1");
assertNotNull(testPage);
//
assertTrue(testPage.isAdapted(ProtectedResource.class));
ProtectedResource pr = testPage.adapt(ProtectedResource.class);
assertEquals(Arrays.asList("test_access_permissions"), pr.getAccessPermissions());
assertEquals("test_edit_permission", pr.getEditPermission());
//
Described testPageDescribed = testPage.adapt(Described.class);
assertEquals("test_title", testPageDescribed.getName());
assertEquals(null, testPageDescribed.getDescription());
//
Attributes testPageAttrs = testPage.getAttributes();
assertEquals("test_factory_id", testPageAttrs.getString("factory-id"));
assertEquals(true, (boolean)testPageAttrs.getBoolean("show-max-window"));
//
UIContainer c = testPage.getRootComponent();
assertNotNull(c);
assertEquals(2, c.getComponents().size());
Iterator<? extends UIComponent> it = c.getComponents().iterator();
//