Collection descriptions = md.getFields("description");
Collection subjects = md.getFields("subject");
assertEquals(2, descriptions.size());
assertEquals(1, subjects.size());
Fragment root = testpage.getRootFragment();
assertNotNull(root);
assertTrue(root.getId().equals("f001"));
assertTrue(root.getName().equals("TwoColumns"));
assertTrue(root.getType().equals(Fragment.LAYOUT));
assertNull(root.getDecorator());
List children = root.getFragments();
assertNotNull(children);
assertTrue(children.size() == 3);
Fragment f = (Fragment) children.get(0);
assertTrue(f.getId().equals("pe001"));
assertTrue(f.getName().equals("HelloPortlet"));
assertTrue(f.getType().equals(Fragment.PORTLET));
Map properties = f.getProperties();
assertNotNull(properties);
assertTrue(properties.size() == 7);
assertEquals("0", f.getProperty(Fragment.ROW_PROPERTY_NAME));
assertEquals(0, f.getIntProperty(Fragment.COLUMN_PROPERTY_NAME));
assertEquals(0, f.getLayoutRow());
assertEquals(0, f.getLayoutColumn());
assertNotNull(f.getProperty(Fragment.X_PROPERTY_NAME));
assertTrue(f.getProperty(Fragment.X_PROPERTY_NAME).startsWith("11.1"));
assertTrue((f.getLayoutX() > 11.0F) && (f.getLayoutX() < 12.0F));
assertTrue((f.getFloatProperty(Fragment.X_PROPERTY_NAME) > 11.0F) &&
(f.getFloatProperty(Fragment.X_PROPERTY_NAME) < 12.0F));
assertTrue((f.getLayoutY() > 22.0F) && (f.getLayoutY() < 23.0F));
assertTrue((f.getLayoutZ() > 33.0F) && (f.getLayoutZ() < 34.0F));
assertTrue((f.getLayoutWidth() > 44.0F) && (f.getLayoutWidth() < 45.0F));
assertTrue((f.getLayoutHeight() > 55.0F) && (f.getLayoutWidth() < 56.0F));
List preferences = f.getPreferences();
assertNotNull(preferences);
assertTrue(preferences.size() == 2);
assertEquals("pref0", ((FragmentPreference)preferences.get(0)).getName());
assertTrue(((FragmentPreference)preferences.get(0)).isReadOnly());
assertNotNull(((FragmentPreference)preferences.get(0)).getValueList());
assertEquals(2, ((FragmentPreference)preferences.get(0)).getValueList().size());
assertEquals("pref0-value0", (String)((FragmentPreference)preferences.get(0)).getValueList().get(0));
assertEquals("pref0-value1", (String)((FragmentPreference)preferences.get(0)).getValueList().get(1));
assertEquals("pref1", ((FragmentPreference)preferences.get(1)).getName());
assertFalse(((FragmentPreference)preferences.get(1)).isReadOnly());
assertNotNull(((FragmentPreference)preferences.get(1)).getValueList());
assertEquals(1, ((FragmentPreference)preferences.get(1)).getValueList().size());
assertEquals("pref1-value", (String)((FragmentPreference)preferences.get(1)).getValueList().get(0));
f = (Fragment) children.get(1);
assertTrue(f.getId().equals("pe002"));
assertTrue(f.getName().equals("JMXPortlet"));
assertTrue(f.getType().equals(Fragment.PORTLET));
properties = f.getProperties();
assertNotNull(properties);
assertTrue(properties.size() == 2);
assertEquals("0", f.getProperty(Fragment.ROW_PROPERTY_NAME));
assertEquals(1, f.getIntProperty(Fragment.COLUMN_PROPERTY_NAME));
f = testpage.getFragmentById("f002");
assertNotNull(f);
assertTrue(f.getId().equals("f002"));
assertTrue(f.getName().equals("Card"));
assertTrue(f.getType().equals(Fragment.LAYOUT));
assertTrue(f.getDecorator().equals("Tab"));
assertNotNull(f.getFragments());
assertTrue(f.getFragments().size() == 2);
List fragments = testpage.getFragmentsByName("JMXPortlet");
assertNotNull(fragments);
assertEquals(1, fragments.size());
assertTrue(((Fragment)fragments.get(0)).getId().equals("pe002"));