XmlObject[] capabilityPropElems = m_resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
assertContainsURI( capabilityPropElems, OperationalStatusCapability.URI );
// init status to Available
OperationalStatusDocument operationalStatusDoc = OperationalStatusDocument.Factory.newInstance();
operationalStatusDoc.setOperationalStatus( OperationalStatusDocument.OperationalStatus.AVAILABLE );
setSingleProperty( m_resource, operationalStatusDoc );
m_resource.subscribe( s_consumerURL, new QName( MuwsConstants.NSURI_MUWS_PART2_TOPICS, OperationalStatusCapability.TOPIC_NAME, MuwsConstants.NSPREFIX_MUWS_PART2_TOPICS ) );
PortListen notifListener = new PortListen( NOTIF_LISTENER_PORT, NOTIF_LISTENER_TIMEOUT );
// change status to Unavailable
operationalStatusDoc.setOperationalStatus( OperationalStatusDocument.OperationalStatus.UNAVAILABLE );
setSingleProperty( m_resource, operationalStatusDoc );
// make sure we receive a propChanged mgmtEvent
ManagementEventType mgmtEvent = waitForManagementEvent( notifListener );
XmlObject[] propChangedEvents = XmlBeanUtils.getChildElements(mgmtEvent, new QName(ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "ResourcePropertyValueChangeNotification"));