}
public void testParseFull() throws IOException {
InputStream in = this.getClass().getResourceAsStream("/portlet-full.xml");
PortletAppDD dd = service.read(in);
assertEquals("1.0", dd.getVersion());
List customPortletModes = dd.getCustomPortletModes();
assertEquals(2, customPortletModes.size());
CustomPortletModeDD cpm1 = (CustomPortletModeDD)customPortletModes.get(0);
assertEquals("customMode", cpm1.getPortletMode());
assertEquals(1, cpm1.getDescriptions().size());
CustomPortletModeDD cpm2 = (CustomPortletModeDD)customPortletModes.get(1);
assertEquals("customMode2", cpm2.getPortletMode());
assertEquals(1, cpm2.getDescriptions().size());
assertEquals(2, dd.getCustomWindowStates().size());
assertEquals(1, dd.getUserAttributes().size());
assertEquals(1, dd.getSecurityConstraints().size());
SecurityConstraintDD sc = (SecurityConstraintDD)dd.getSecurityConstraints().get(0);
assertNotNull(sc.getPortletCollection());
assertEquals(1, sc.getDisplayNames().size());
assertEquals(3, sc.getPortletCollection().getPortletNames().size());
assertEquals("a", sc.getPortletCollection().getPortletNames().get(0));
assertEquals("b", sc.getPortletCollection().getPortletNames().get(1));
assertEquals("c", sc.getPortletCollection().getPortletNames().get(2));
assertNotNull(sc.getUserDataConstraint());
assertEquals(1, sc.getUserDataConstraint().getDescriptions().size());
assertEquals("NONE", sc.getUserDataConstraint().getTransportGuarantee());
List portlets = dd.getPortlets();
assertEquals(1, portlets.size());
PortletDD pd = (PortletDD)portlets.get(0);
assertEquals(1, pd.getDescriptions().size());
assertEquals(2, pd.getDisplayNames().size());