mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestAssetNamespace.java
@Test
    public final void testDeactivateAsset() throws IOException, InterruptedException
    {        
        MessageListener listener = new MessageListener(socket);

        AssetNamespaceUtils.activateAsset(socket, testUuid);
        
        AssetNamespaceUtils.deactivateAsset(socket, testUuid);   
        
        GetActiveStatusRequestData request2 = GetActiveStatusRequestData.newBuilder().
                setUuid(testUuid).build(); 
        
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetMessage(
                AssetMessageType.GetActiveStatusRequest, request2);        
        message.writeDelimitedTo(socket.getOutputStream());
        
        //listen for messages for a specific time interval
        Message responseRcvd = listener.waitForMessage(Namespace.Asset, 
                AssetMessageType.GetActiveStatusResponse, 500);   
        AssetNamespace response = (AssetNamespace)responseRcvd;

        GetActiveStatusResponseData dataResponse = GetActiveStatusResponseData.parseFrom(response.getData());     
        
        assertThat(dataResponse.getStatus(), is(AssetMessages.AssetActiveStatus.DEACTIVATED));
        assertThat(dataResponse.getUuid(), is(testUuid));        
    }
/**
     * Verifies the ability of the system to handle a remote request to deactivate an asset. 
     * Verifies the ability of the system to handle a remote request to get the status of an asset.
     */
Verifies the ability of the system to handle a remote request to deactivate an asset.
Verifies the ability of the system to handle a remote request to get the status of an asset.
Verifies the ability of the system to handle a remote request to deactivate an asset . Verifies the ability of the system to handle a remote request to get the status of an asset .
@Test
    public final void testDeactivateAsset() throws IOException, InterruptedException
    {        
        MessageListener listener = new MessageListener(socket);
        AssetNamespaceUtils.activateAsset(socket, testUuid);
        AssetNamespaceUtils.deactivateAsset(socket, testUuid);   
        GetActiveStatusRequestData request2 = GetActiveStatusRequestData.newBuilder().
                setUuid(testUuid).build(); 
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetMessage(
                AssetMessageType.GetActiveStatusRequest, request2);        
        message.writeDelimitedTo(socket.getOutputStream());
        Message responseRcvd = listener.waitForMessage(Namespace.Asset, 
                AssetMessageType.GetActiveStatusResponse, 500);   
        AssetNamespace response = (AssetNamespace)responseRcvd;
        GetActiveStatusResponseData dataResponse = GetActiveStatusResponseData.parseFrom(response.getData());     
        assertThat(dataResponse.getStatus(), is(AssetMessages.AssetActiveStatus.DEACTIVATED));
        assertThat(dataResponse.getUuid(), is(testUuid));        
    }
@ Test public final void testDeactivateAsset ( ) throws IOException , InterruptedException { MessageListener listener = new MessageListener ( socket ) ; AssetNamespaceUtils . activateAsset ( socket , testUuid ) ; AssetNamespaceUtils . deactivateAsset ( socket , testUuid ) ; GetActiveStatusRequestData request2 = GetActiveStatusRequestData . newBuilder ( ) . setUuid ( testUuid ) . build ( ) ; TerraHarvestMessage message = AssetNamespaceUtils . createAssetMessage ( AssetMessageType . GetActiveStatusRequest , request2 ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; Message responseRcvd = listener . waitForMessage ( Namespace . Asset , AssetMessageType . GetActiveStatusResponse , 500 ) ; AssetNamespace response = ( AssetNamespace ) responseRcvd ; GetActiveStatusResponseData dataResponse = GetActiveStatusResponseData . parseFrom ( response . getData ( ) ) ; assertThat ( dataResponse . getStatus ( ) , is ( AssetMessages . AssetActiveStatus . DEACTIVATED ) ) ; assertThat ( dataResponse . getUuid ( ) , is ( testUuid ) ) ; }
Verifies the ability of the system to handle a remote request to deactivate an asset.
Verifies the ability of the system to handle a remote request to deactivate an asset .
//listen for messages for a specific time interval