mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestObservationStoreMessageService.java
@Test
    public void testRemoveObservationAssetType() throws IOException, InterruptedException
    {
        //create observation
        AssetNamespaceUtils.requestDataCapture(socket, assetUuid);

        //message listener that will wait for responses
        MessageListener listener = new MessageListener(socket);

        //create get observation request
        Query query = Query.newBuilder().setAssetType(ASSET_TYPE).build();
        RemoveObservationRequestData obsResquest = RemoveObservationRequestData.newBuilder().
            setObsQuery(query).build();

        //send request
        TerraHarvestMessage message = createObservationStoreMessage(
            ObservationStoreMessageType.RemoveObservationRequest, obsResquest);

        //send request
        message.writeDelimitedTo(socket.getOutputStream());

        //wait for response
        listener.waitForMessage(Namespace.ObservationStore, 
            ObservationStoreMessageType.RemoveObservationResponse, WAIT_TIME_MS);
    }
/**
     * Test removing observations from a remote system via asset type. 
     * 
     * Verify an observations are removed.
     */
Test removing observations from a remote system via asset type.

Verify an observations are removed.
Test removing observations from a remote system via asset type . Verify an observations are removed .
@Test
    public void testRemoveObservationAssetType() throws IOException, InterruptedException
    {
        AssetNamespaceUtils.requestDataCapture(socket, assetUuid);
        MessageListener listener = new MessageListener(socket);
        Query query = Query.newBuilder().setAssetType(ASSET_TYPE).build();
        RemoveObservationRequestData obsResquest = RemoveObservationRequestData.newBuilder().
            setObsQuery(query).build();
        TerraHarvestMessage message = createObservationStoreMessage(
            ObservationStoreMessageType.RemoveObservationRequest, obsResquest);
        message.writeDelimitedTo(socket.getOutputStream());
        listener.waitForMessage(Namespace.ObservationStore, 
            ObservationStoreMessageType.RemoveObservationResponse, WAIT_TIME_MS);
    }
@ Test public void testRemoveObservationAssetType ( ) throws IOException , InterruptedException { AssetNamespaceUtils . requestDataCapture ( socket , assetUuid ) ; MessageListener listener = new MessageListener ( socket ) ; Query query = Query . newBuilder ( ) . setAssetType ( ASSET_TYPE ) . build ( ) ; RemoveObservationRequestData obsResquest = RemoveObservationRequestData . newBuilder ( ) . setObsQuery ( query ) . build ( ) ; TerraHarvestMessage message = createObservationStoreMessage ( ObservationStoreMessageType . RemoveObservationRequest , obsResquest ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; listener . waitForMessage ( Namespace . ObservationStore , ObservationStoreMessageType . RemoveObservationResponse , WAIT_TIME_MS ) ; }
Test removing observations from a remote system via asset type.
Test removing observations from a remote system via asset type .
//create observation //message listener that will wait for responses //create get observation request //send request //send request //wait for response