.append(xmlBegin168).append(portlet168)
.append(attrs168).append(xmlEnd);
InputStream in = new ByteArrayInputStream(xml286.toString().getBytes());
PortletApplicationDefinition portletApp286 = jaxb.read("test", "/test", in);
in = new ByteArrayInputStream(xml168.toString().getBytes());
PortletApplicationDefinition portletApp168 = jaxb.read("test", "/test", in);
// test if portlet has the right params:
// test jsr168 compliant portlets
PortletDefinition portlet168 = (PortletDefinition)portletApp168.getPortlets().get(0);
assertTrue(portlet168.getExpirationCache()==50);
assertEquals(portlet168.getPortletName(),"portlet168");
assertEquals(portlet168.getInitParams().get(0).getParamValue(),"value");
assertEquals(portlet168.getSecurityRoleRefs().get(0).getRoleLink(), "role-link");
assertEquals(portletApp168.getCustomPortletModes().get(0).getPortletMode(), "portlet-mode");
assertEquals(portletApp168.getCustomWindowStates().get(0).getWindowState(), "window-state");
assertEquals(portletApp168.getUserAttributes().get(0).getName(), "name" );
assertEquals(portletApp168.getSecurityConstraints().get(0).getPortletNames().get(0), "portlet-name");
assertEquals(portlet168.getExpirationCache(), 50);
// id (isn't supported yet)
// assertFalse(portletApp.getId().equals("id2"));
// assertTrue(portletApp.getId().equals("id1"));