mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestConfigAdminNamespace.java
@Test
    public void testDeleteConfiguration() throws UnknownHostException, IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        
        UUID someUUID = UUID.randomUUID();
        CreateFactoryConfigurationRequestData request = CreateFactoryConfigurationRequestData.newBuilder().
                setFactoryPid("example.asset.ExampleAssetConfig").
                addFactoryProperty(SimpleTypesMapEntry.newBuilder().setKey("someKey").
                        setValue(Multitype.newBuilder().setType(Type.STRING).
                                setStringValue(someUUID.toString())).build()).build();
            
        //create terra harvest message   
        TerraHarvestMessage message = createConfigAdminMessage(
            ConfigAdminMessageType.CreateFactoryConfigurationRequest, request);
                    
        // send out message
        message.writeDelimitedTo(socket.getOutputStream());
 
        // read in response
        Message messageRcvd = 
                listener.waitForMessage(Namespace.ConfigAdmin, 
                        ConfigAdminMessageType.CreateFactoryConfigurationResponse, 1500);
            
        ConfigAdminNamespace nameMessage = (ConfigAdminNamespace) messageRcvd;
        CreateFactoryConfigurationResponseData response = CreateFactoryConfigurationResponseData.
            parseFrom(nameMessage.getData());
        assertThat(response.hasPid(), is(true));
        String newPid = response.getPid();

        //remove the configuration
        ConfigNamespaceUtils.deleteConfig(newPid, socket, listener);
    }
/**
     * Test delete configuration request.
     * 
     * Verify configuration is removed.
     */
Test delete configuration request.

Verify configuration is removed.
Test delete configuration request . Verify configuration is removed .
@Test
    public void testDeleteConfiguration() throws UnknownHostException, IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        UUID someUUID = UUID.randomUUID();
        CreateFactoryConfigurationRequestData request = CreateFactoryConfigurationRequestData.newBuilder().
                setFactoryPid("example.asset.ExampleAssetConfig").
                addFactoryProperty(SimpleTypesMapEntry.newBuilder().setKey("someKey").
                        setValue(Multitype.newBuilder().setType(Type.STRING).
                                setStringValue(someUUID.toString())).build()).build();
        TerraHarvestMessage message = createConfigAdminMessage(
            ConfigAdminMessageType.CreateFactoryConfigurationRequest, request);
        message.writeDelimitedTo(socket.getOutputStream());
        Message messageRcvd = 
                listener.waitForMessage(Namespace.ConfigAdmin, 
                        ConfigAdminMessageType.CreateFactoryConfigurationResponse, 1500);
        ConfigAdminNamespace nameMessage = (ConfigAdminNamespace) messageRcvd;
        CreateFactoryConfigurationResponseData response = CreateFactoryConfigurationResponseData.
            parseFrom(nameMessage.getData());
        assertThat(response.hasPid(), is(true));
        String newPid = response.getPid();
        ConfigNamespaceUtils.deleteConfig(newPid, socket, listener);
    }
@ Test public void testDeleteConfiguration ( ) throws UnknownHostException , IOException , InterruptedException { MessageListener listener = new MessageListener ( socket ) ; UUID someUUID = UUID . randomUUID ( ) ; CreateFactoryConfigurationRequestData request = CreateFactoryConfigurationRequestData . newBuilder ( ) . setFactoryPid ( "example.asset.ExampleAssetConfig" ) . addFactoryProperty ( SimpleTypesMapEntry . newBuilder ( ) . setKey ( "someKey" ) . setValue ( Multitype . newBuilder ( ) . setType ( Type . STRING ) . setStringValue ( someUUID . toString ( ) ) ) . build ( ) ) . build ( ) ; TerraHarvestMessage message = createConfigAdminMessage ( ConfigAdminMessageType . CreateFactoryConfigurationRequest , request ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; Message messageRcvd = listener . waitForMessage ( Namespace . ConfigAdmin , ConfigAdminMessageType . CreateFactoryConfigurationResponse , 1500 ) ; ConfigAdminNamespace nameMessage = ( ConfigAdminNamespace ) messageRcvd ; CreateFactoryConfigurationResponseData response = CreateFactoryConfigurationResponseData . parseFrom ( nameMessage . getData ( ) ) ; assertThat ( response . hasPid ( ) , is ( true ) ) ; String newPid = response . getPid ( ) ; ConfigNamespaceUtils . deleteConfig ( newPid , socket , listener ) ; }
Test delete configuration request.
Test delete configuration request .
//create terra harvest message    // send out message // read in response //remove the configuration