{
String path = "net/sf/jportlet/descriptor/test/portlet.xml";
InputStream in = getClass( ).getClassLoader( ).getResourceAsStream( path );
ApplicationDescriptorLoaderXml loader = new ApplicationDescriptorLoaderXml( );
ApplicationDescriptor app = loader.load( in );
assertNotNull( "app", app );
assertEquals( "app.name", "Portlet Application", app.getName( ) );
assertEquals( "app.contextParameter[param1]", "value1", app.getContextParameter( "param1" ) );
PortletDescriptor portlet = app.getPortletDescriptor( "portlet1" );
assertNotNull( "portlet1 not found", portlet );
assertEquals( "portlet.name", "portlet1", portlet.getName( ) );
assertEquals( "portlet.portletClass", PortletAdapter.class, portlet.getPortletClass( ) );
assertEquals( "portlet.actionListenerClass", ApplicationDescriptorLoaderTest.class, portlet.getActionListenerClass( ) );
assertEquals( "portlet.messageListenerClass", ApplicationDescriptorLoaderTest.class, portlet.getMessageListenerClass( ) );