mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestAssetDirectoryServiceNamespace.java
@Test
    public final void testGetAssetTypes() throws IOException
    {        
        MessageListener listener = new MessageListener(socket);
                  
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetDirSvcNamespaceMessage(
                AssetDirectoryServiceMessageType.GetAssetTypesRequest, null);
        message.writeDelimitedTo(socket.getOutputStream());
        
        //listen for messages for a specific time interval
        Message responseRcvd = listener.waitForMessage(Namespace.AssetDirectoryService, 
                AssetDirectoryServiceMessageType.GetAssetTypesResponse, 500);  
        AssetDirectoryServiceNamespace response = (AssetDirectoryServiceNamespace)responseRcvd;
        GetAssetTypesResponseData dataResponse = GetAssetTypesResponseData.parseFrom(response.getData());
        
        //verify name and type of created asset is in list of all assets
        assertThat(dataResponse.getProductNameCount(), is(greaterThanOrEqualTo(1)));
        assertThat(dataResponse.getProductTypeCount(), is(greaterThanOrEqualTo(1)));
        assertThat(dataResponse.getProductNameList(), hasItem("ExampleAsset"));
        assertThat(dataResponse.getProductTypeList(), hasItem(ExampleAsset.class.getName()));        
    }
/**
     * Verifies the ability to remotely get the name and type of the assets created in a bundle,
     * assuming 1 and only 1 asset factory has been registered upon execution of this test.
     */
Verifies the ability to remotely get the name and type of the assets created in a bundle,
assuming 1 and only 1 asset factory has been registered upon execution of this test.
Verifies the ability to remotely get the name and type of the assets created in a bundle assuming 1 and only 1 asset factory has been registered upon execution of this test .
@Test
    public final void testGetAssetTypes() throws IOException
    {        
        MessageListener listener = new MessageListener(socket);
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetDirSvcNamespaceMessage(
                AssetDirectoryServiceMessageType.GetAssetTypesRequest, null);
        message.writeDelimitedTo(socket.getOutputStream());
        Message responseRcvd = listener.waitForMessage(Namespace.AssetDirectoryService, 
                AssetDirectoryServiceMessageType.GetAssetTypesResponse, 500);  
        AssetDirectoryServiceNamespace response = (AssetDirectoryServiceNamespace)responseRcvd;
        GetAssetTypesResponseData dataResponse = GetAssetTypesResponseData.parseFrom(response.getData());
        assertThat(dataResponse.getProductNameCount(), is(greaterThanOrEqualTo(1)));
        assertThat(dataResponse.getProductTypeCount(), is(greaterThanOrEqualTo(1)));
        assertThat(dataResponse.getProductNameList(), hasItem("ExampleAsset"));
        assertThat(dataResponse.getProductTypeList(), hasItem(ExampleAsset.class.getName()));        
    }
@ Test public final void testGetAssetTypes ( ) throws IOException { MessageListener listener = new MessageListener ( socket ) ; TerraHarvestMessage message = AssetNamespaceUtils . createAssetDirSvcNamespaceMessage ( AssetDirectoryServiceMessageType . GetAssetTypesRequest , null ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; Message responseRcvd = listener . waitForMessage ( Namespace . AssetDirectoryService , AssetDirectoryServiceMessageType . GetAssetTypesResponse , 500 ) ; AssetDirectoryServiceNamespace response = ( AssetDirectoryServiceNamespace ) responseRcvd ; GetAssetTypesResponseData dataResponse = GetAssetTypesResponseData . parseFrom ( response . getData ( ) ) ; assertThat ( dataResponse . getProductNameCount ( ) , is ( greaterThanOrEqualTo ( 1 ) ) ) ; assertThat ( dataResponse . getProductTypeCount ( ) , is ( greaterThanOrEqualTo ( 1 ) ) ) ; assertThat ( dataResponse . getProductNameList ( ) , hasItem ( "ExampleAsset" ) ) ; assertThat ( dataResponse . getProductTypeList ( ) , hasItem ( ExampleAsset . class . getName ( ) ) ) ; }
Verifies the ability to remotely get the name and type of the assets created in a bundle,
 assuming 1 and only 1 asset factory has been registered upon execution of this test.
Verifies the ability to remotely get the name and type of the assets created in a bundle assuming 1 and only 1 asset factory has been registered upon execution of this test .
//listen for messages for a specific time interval //verify name and type of created asset is in list of all assets