mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestBaseNamespace.java
@Test
    public void testSystemStatus() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        // send out message 
        BaseNamespace.Builder baseNamespaceMsg = BaseNamespace.newBuilder().
                setType(BaseMessageType.GetOperationModeRequest);
        TerraHarvestMessage request = TerraHarvestMessageHelper.createTerraHarvestMsg(Namespace.Base, baseNamespaceMsg);
        request.writeDelimitedTo(socket.getOutputStream());

        // read in response
        Message response = listener.waitForMessage(Namespace.Base, 
                BaseMessageType.GetOperationModeResponse, 300);
        BaseNamespace namespaceResponse = (BaseNamespace)response;
        assertThat(namespaceResponse, is(notNullValue()));
        assertThat(namespaceResponse.getType(), is(BaseMessageType.GetOperationModeResponse));
        
        GetOperationModeReponseData opMode = GetOperationModeReponseData.parseFrom(namespaceResponse.getData());
        assertThat(opMode.getMode(), is(OperationMode.TEST_MODE));
        
        socket.close();
    }
/**
     * Verify sending a operation mode request message returns with default operation mode of test.
     */
Verify sending a operation mode request message returns with default operation mode of test.
Verify sending a operation mode request message returns with default operation mode of test .
@Test
    public void testSystemStatus() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(socket);
        BaseNamespace.Builder baseNamespaceMsg = BaseNamespace.newBuilder().
                setType(BaseMessageType.GetOperationModeRequest);
        TerraHarvestMessage request = TerraHarvestMessageHelper.createTerraHarvestMsg(Namespace.Base, baseNamespaceMsg);
        request.writeDelimitedTo(socket.getOutputStream());
        Message response = listener.waitForMessage(Namespace.Base, 
                BaseMessageType.GetOperationModeResponse, 300);
        BaseNamespace namespaceResponse = (BaseNamespace)response;
        assertThat(namespaceResponse, is(notNullValue()));
        assertThat(namespaceResponse.getType(), is(BaseMessageType.GetOperationModeResponse));
        GetOperationModeReponseData opMode = GetOperationModeReponseData.parseFrom(namespaceResponse.getData());
        assertThat(opMode.getMode(), is(OperationMode.TEST_MODE));
        socket.close();
    }
@ Test public void testSystemStatus ( ) throws IOException , InterruptedException { MessageListener listener = new MessageListener ( socket ) ; BaseNamespace . Builder baseNamespaceMsg = BaseNamespace . newBuilder ( ) . setType ( BaseMessageType . GetOperationModeRequest ) ; TerraHarvestMessage request = TerraHarvestMessageHelper . createTerraHarvestMsg ( Namespace . Base , baseNamespaceMsg ) ; request . writeDelimitedTo ( socket . getOutputStream ( ) ) ; Message response = listener . waitForMessage ( Namespace . Base , BaseMessageType . GetOperationModeResponse , 300 ) ; BaseNamespace namespaceResponse = ( BaseNamespace ) response ; assertThat ( namespaceResponse , is ( notNullValue ( ) ) ) ; assertThat ( namespaceResponse . getType ( ) , is ( BaseMessageType . GetOperationModeResponse ) ) ; GetOperationModeReponseData opMode = GetOperationModeReponseData . parseFrom ( namespaceResponse . getData ( ) ) ; assertThat ( opMode . getMode ( ) , is ( OperationMode . TEST_MODE ) ) ; socket . close ( ) ; }
Verify sending a operation mode request message returns with default operation mode of test.
Verify sending a operation mode request message returns with default operation mode of test .
// send out message  // read in response