mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestConfigAdminNamespace.java
@Test
    public void testGetConfigurationInfo() throws IOException, InterruptedException
    {
        ConfigNamespaceUtils.setConfigProperty(ExampleClass.CONFIG_PID, "name", "golden egg", socket);
        
        //allow config admin to post property set
        Thread.sleep(1000);
        
        MessageListener listener = new MessageListener(socket);
        
        GetConfigurationInfoRequestData request = GetConfigurationInfoRequestData.newBuilder().
            setFilter("(name=golden egg)").setIncludeProperties(false).build();
        
        //create terra harvest message   
        TerraHarvestMessage message = createConfigAdminMessage(ConfigAdminMessageType.GetConfigurationInfoRequest, 
            request);
                
        // send out message
        message.writeDelimitedTo(socket.getOutputStream());
        
        Message messageRcvd = 
            listener.waitForMessage(Namespace.ConfigAdmin, ConfigAdminMessageType.GetConfigurationInfoResponse, 1000);

        //parse specific message type
        ConfigAdminNamespace namespaceResponse = (ConfigAdminNamespace) messageRcvd;
        assertThat(namespaceResponse.getType(), is(ConfigAdminMessageType.GetConfigurationInfoResponse));
        //verify
        GetConfigurationInfoResponseData responseData = GetConfigurationInfoResponseData.
            parseFrom(namespaceResponse.getData());
        List<ConfigurationInfoType> data = responseData.getConfigurationsList();
        assertThat(data.size(), is(1));
        assertThat(data.get(0).getPid(), is(ExampleClass.CONFIG_PID));
        assertThat(data.get(0).hasFactoryPid(), is(false));
        assertThat(data.get(0).getBundleLocation(), is(notNullValue()));
    }
/**
     * Test the get configuration info request. 
     * 
     * Verify that the configuration list is returned and contains the PID value previously set.
     */
Test the get configuration info request.

Verify that the configuration list is returned and contains the PID value previously set.
Test the get configuration info request . Verify that the configuration list is returned and contains the PID value previously set .
@Test
    public void testGetConfigurationInfo() throws IOException, InterruptedException
    {
        ConfigNamespaceUtils.setConfigProperty(ExampleClass.CONFIG_PID, "name", "golden egg", socket);
        Thread.sleep(1000);
        MessageListener listener = new MessageListener(socket);
        GetConfigurationInfoRequestData request = GetConfigurationInfoRequestData.newBuilder().
            setFilter("(name=golden egg)").setIncludeProperties(false).build();
        TerraHarvestMessage message = createConfigAdminMessage(ConfigAdminMessageType.GetConfigurationInfoRequest, 
            request);
        message.writeDelimitedTo(socket.getOutputStream());
        Message messageRcvd = 
            listener.waitForMessage(Namespace.ConfigAdmin, ConfigAdminMessageType.GetConfigurationInfoResponse, 1000);
        ConfigAdminNamespace namespaceResponse = (ConfigAdminNamespace) messageRcvd;
        assertThat(namespaceResponse.getType(), is(ConfigAdminMessageType.GetConfigurationInfoResponse));
        GetConfigurationInfoResponseData responseData = GetConfigurationInfoResponseData.
            parseFrom(namespaceResponse.getData());
        List<ConfigurationInfoType> data = responseData.getConfigurationsList();
        assertThat(data.size(), is(1));
        assertThat(data.get(0).getPid(), is(ExampleClass.CONFIG_PID));
        assertThat(data.get(0).hasFactoryPid(), is(false));
        assertThat(data.get(0).getBundleLocation(), is(notNullValue()));
    }
@ Test public void testGetConfigurationInfo ( ) throws IOException , InterruptedException { ConfigNamespaceUtils . setConfigProperty ( ExampleClass . CONFIG_PID , "name" , "golden egg" , socket ) ; Thread . sleep ( 1000 ) ; MessageListener listener = new MessageListener ( socket ) ; GetConfigurationInfoRequestData request = GetConfigurationInfoRequestData . newBuilder ( ) . setFilter ( "(name=golden egg)" ) . setIncludeProperties ( false ) . build ( ) ; TerraHarvestMessage message = createConfigAdminMessage ( ConfigAdminMessageType . GetConfigurationInfoRequest , request ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; Message messageRcvd = listener . waitForMessage ( Namespace . ConfigAdmin , ConfigAdminMessageType . GetConfigurationInfoResponse , 1000 ) ; ConfigAdminNamespace namespaceResponse = ( ConfigAdminNamespace ) messageRcvd ; assertThat ( namespaceResponse . getType ( ) , is ( ConfigAdminMessageType . GetConfigurationInfoResponse ) ) ; GetConfigurationInfoResponseData responseData = GetConfigurationInfoResponseData . parseFrom ( namespaceResponse . getData ( ) ) ; List < ConfigurationInfoType > data = responseData . getConfigurationsList ( ) ; assertThat ( data . size ( ) , is ( 1 ) ) ; assertThat ( data . get ( 0 ) . getPid ( ) , is ( ExampleClass . CONFIG_PID ) ) ; assertThat ( data . get ( 0 ) . hasFactoryPid ( ) , is ( false ) ) ; assertThat ( data . get ( 0 ) . getBundleLocation ( ) , is ( notNullValue ( ) ) ) ; }
Test the get configuration info request.
Test the get configuration info request .
//allow config admin to post property set //create terra harvest message    // send out message //parse specific message type //verify