mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/controller/TestControllerMgrImpl.java
@Test
    public void testEventHelperGetControllerCaps_OneofNotSet()
    {
        //controller ID
        int contNew = 6431;        
        RemoteChannel channel = addChannelMockHelper(contNew);//mock channel lookup
        
        //mock addition of controller
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(channel, contNew));  
        //mock sys info response for new controller
        mockControllerMessage(contNew, BaseMessageType.ControllerInfo);
        
        // clear out capabilities being sent
        GetControllerCapabilitiesResponseData.Builder builder =
                (GetControllerCapabilitiesResponseData.Builder)createMessage(
                        BaseMessageType.GetControllerCapabilitiesResponse);
        builder.clearControllerCapabilities();
        mockControllerMessage(contNew, BaseMessageType.GetControllerCapabilitiesResponse, builder);
       
        //get controller
        ControllerModel controller = m_SUT.getController(contNew);

        assertThat(controller.getCapabilities(), is(nullValue()));
    }
/**
     * Verify if the controller caps native field is not set, capabilities are not available.
     */
Verify if the controller caps native field is not set, capabilities are not available.
Verify if the controller caps native field is not set capabilities are not available .
@Test
    public void testEventHelperGetControllerCaps_OneofNotSet()
    {
        int contNew = 6431;        
        RemoteChannel channel = addChannelMockHelper(contNew);
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(channel, contNew));  
        mockControllerMessage(contNew, BaseMessageType.ControllerInfo);
        GetControllerCapabilitiesResponseData.Builder builder =
                (GetControllerCapabilitiesResponseData.Builder)createMessage(
                        BaseMessageType.GetControllerCapabilitiesResponse);
        builder.clearControllerCapabilities();
        mockControllerMessage(contNew, BaseMessageType.GetControllerCapabilitiesResponse, builder);
        ControllerModel controller = m_SUT.getController(contNew);
        assertThat(controller.getCapabilities(), is(nullValue()));
    }
@ Test public void testEventHelperGetControllerCaps_OneofNotSet ( ) { int contNew = 6431 ; RemoteChannel channel = addChannelMockHelper ( contNew ) ; m_ChannelHelper . handleEvent ( createBasicChannelUpdatedEvent ( channel , contNew ) ) ; mockControllerMessage ( contNew , BaseMessageType . ControllerInfo ) ; GetControllerCapabilitiesResponseData . Builder builder = ( GetControllerCapabilitiesResponseData . Builder ) createMessage ( BaseMessageType . GetControllerCapabilitiesResponse ) ; builder . clearControllerCapabilities ( ) ; mockControllerMessage ( contNew , BaseMessageType . GetControllerCapabilitiesResponse , builder ) ; ControllerModel controller = m_SUT . getController ( contNew ) ; assertThat ( controller . getCapabilities ( ) , is ( nullValue ( ) ) ) ; }
Verify if the controller caps native field is not set, capabilities are not available.
Verify if the controller caps native field is not set capabilities are not available .
//controller ID //mock channel lookup //mock addition of controller //mock sys info response for new controller // clear out capabilities being sent //get controller