mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/messaging/TestMessageFactoryImpl.java
@Test
    public void testSendConfigAdminNamespace() throws IOException
    {
        // construct data message to send
        GetConfigurationInfoRequestData getConfigInfoData = 
                GetConfigurationInfoRequestData.newBuilder().setFilter("test").setIncludeProperties(false).build();
        
        MessageWrapper request = 
                m_SUT.createConfigAdminMessage(ConfigAdminMessageType.GetConfigurationInfoRequest, getConfigInfoData);
            
        // request sending and verify namespace
        ByteString namespace = confirmWrapperTrySend(request, Namespace.ConfigAdmin, 1);

        // verify namespace message
        ConfigAdminNamespace configAdminMessageResponse = 
                ConfigAdminNamespace.parseFrom(namespace);
        assertThat(configAdminMessageResponse.getType(), is(ConfigAdminMessageType.GetConfigurationInfoRequest));
        
        //verify data message
        assertThat(configAdminMessageResponse.getData(), is(getConfigInfoData.toByteString()));
        
        //--send again with null for the data message--//
        request = m_SUT.createConfigAdminMessage(ConfigAdminMessageType.GetConfigurationInfoRequest, null);
            
        // request sending
        namespace = confirmWrapperTrySend(request, Namespace.ConfigAdmin, 2);

        // verify namespace message
        configAdminMessageResponse = ConfigAdminNamespace.parseFrom(namespace);
        assertThat(configAdminMessageResponse.getType(), is(ConfigAdminMessageType.GetConfigurationInfoRequest));
        
        //verify data message
        assertThat(configAdminMessageResponse.hasData(), is(false));
    }
/**
     * Verify the message wrapper returned contains the expected config admin contents.
     */
Verify the message wrapper returned contains the expected config admin contents.
Verify the message wrapper returned contains the expected config admin contents .
@Test
    public void testSendConfigAdminNamespace() throws IOException
    {
        GetConfigurationInfoRequestData getConfigInfoData = 
                GetConfigurationInfoRequestData.newBuilder().setFilter("test").setIncludeProperties(false).build();
        MessageWrapper request = 
                m_SUT.createConfigAdminMessage(ConfigAdminMessageType.GetConfigurationInfoRequest, getConfigInfoData);
        ByteString namespace = confirmWrapperTrySend(request, Namespace.ConfigAdmin, 1);
        ConfigAdminNamespace configAdminMessageResponse = 
                ConfigAdminNamespace.parseFrom(namespace);
        assertThat(configAdminMessageResponse.getType(), is(ConfigAdminMessageType.GetConfigurationInfoRequest));
        assertThat(configAdminMessageResponse.getData(), is(getConfigInfoData.toByteString()));
        request = m_SUT.createConfigAdminMessage(ConfigAdminMessageType.GetConfigurationInfoRequest, null);
        namespace = confirmWrapperTrySend(request, Namespace.ConfigAdmin, 2);
        configAdminMessageResponse = ConfigAdminNamespace.parseFrom(namespace);
        assertThat(configAdminMessageResponse.getType(), is(ConfigAdminMessageType.GetConfigurationInfoRequest));
        assertThat(configAdminMessageResponse.hasData(), is(false));
    }
@ Test public void testSendConfigAdminNamespace ( ) throws IOException { GetConfigurationInfoRequestData getConfigInfoData = GetConfigurationInfoRequestData . newBuilder ( ) . setFilter ( "test" ) . setIncludeProperties ( false ) . build ( ) ; MessageWrapper request = m_SUT . createConfigAdminMessage ( ConfigAdminMessageType . GetConfigurationInfoRequest , getConfigInfoData ) ; ByteString namespace = confirmWrapperTrySend ( request , Namespace . ConfigAdmin , 1 ) ; ConfigAdminNamespace configAdminMessageResponse = ConfigAdminNamespace . parseFrom ( namespace ) ; assertThat ( configAdminMessageResponse . getType ( ) , is ( ConfigAdminMessageType . GetConfigurationInfoRequest ) ) ; assertThat ( configAdminMessageResponse . getData ( ) , is ( getConfigInfoData . toByteString ( ) ) ) ; request = m_SUT . createConfigAdminMessage ( ConfigAdminMessageType . GetConfigurationInfoRequest , null ) ; namespace = confirmWrapperTrySend ( request , Namespace . ConfigAdmin , 2 ) ; configAdminMessageResponse = ConfigAdminNamespace . parseFrom ( namespace ) ; assertThat ( configAdminMessageResponse . getType ( ) , is ( ConfigAdminMessageType . GetConfigurationInfoRequest ) ) ; assertThat ( configAdminMessageResponse . hasData ( ) , is ( false ) ) ; }
Verify the message wrapper returned contains the expected config admin contents.
Verify the message wrapper returned contains the expected config admin contents .
// construct data message to send // request sending and verify namespace // verify namespace message //verify data message //--send again with null for the data message--// // request sending // verify namespace message //verify data message