*/
public void testSetTerminationTimeSubscription( )
throws Exception
{
//test as a listener for events
PortListen notificationListener = new PortListen( NOTIFICATION_LISTENER_PORT, 15000 );
SubscribeResponse sub_response =
subscribe( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
"http://127.0.0.1:" + NOTIFICATION_LISTENER_PORT );
testDiskPortSetResourcePropertiesUpdate( );
String incomingMessage = notificationListener.waitForIncomingMessage( );
assertFalse( incomingMessage.startsWith( "ERROR" ) );
EndpointReferenceType subscriptionReference = sub_response.getSubscriptionReference( );
SubscriptionManagerHttpBindingStub subMgrBinding = getSubMgrBinding( );
assertNotNull( subMgrBinding );
subMgrBinding.setResourceId( AxisGenTypesUtils.getResourceId( subscriptionReference ) );
SetTerminationTime termTime = new SetTerminationTime( );
Calendar calendar = Calendar.getInstance( );
//set to the start of time ;-) ..its already expired
calendar.setTimeInMillis( 0 );
termTime.setRequestedTerminationTime( calendar );
subMgrBinding.setTerminationTime( termTime );
notificationListener = new PortListen( NOTIFICATION_LISTENER_PORT, 5000 );
testDiskPortSetResourcePropertiesUpdate( );
String response = notificationListener.waitForIncomingMessage( );
assertTrue( response.startsWith( "ERROR" ) );
}