mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/controller/TestControllerMgrImpl.java
@Test
    public void testGetController()
    {
        //mock remote channel lookup behavior
        RemoteChannel chan = mock(RemoteChannel.class);
        List<RemoteChannel> setChanns = new ArrayList<RemoteChannel>();
        setChanns.add(chan);
        
        //sets up the map of channels by controller ID
        setUpFourChannels(setChanns);
        
        //create 4 channels
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(mock(RemoteChannel.class), CONT_ID_1));
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(mock(RemoteChannel.class), CONT_ID_2));
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(mock(RemoteChannel.class), CONT_ID_3));
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(mock(RemoteChannel.class), CONT_ID_4));
        
        //get one controller
        assertThat(m_SUT.getController(CONT_ID_4), is(notNullValue()));
        
        //get all controllers, there should be the four just added
        assertThat(m_SUT.getAllControllers().size(), is(4));
        
        assertThat(m_SUT.getController(CONT_ID_1).needsCleanupRequest(), is(true));
        assertThat(m_SUT.getController(CONT_ID_2).needsCleanupRequest(), is(true));
        assertThat(m_SUT.getController(CONT_ID_3).needsCleanupRequest(), is(true));
        assertThat(m_SUT.getController(CONT_ID_4).needsCleanupRequest(), is(true));
    }
/**
     * Test getting a controller by its ID.
     * 
     * Test that all controllers are added and retrievable.
     */
Test getting a controller by its ID.

Test that all controllers are added and retrievable.
Test getting a controller by its ID . Test that all controllers are added and retrievable .
@Test
    public void testGetController()
    {
        RemoteChannel chan = mock(RemoteChannel.class);
        List<RemoteChannel> setChanns = new ArrayList<RemoteChannel>();
        setChanns.add(chan);
        setUpFourChannels(setChanns);
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(mock(RemoteChannel.class), CONT_ID_1));
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(mock(RemoteChannel.class), CONT_ID_2));
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(mock(RemoteChannel.class), CONT_ID_3));
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(mock(RemoteChannel.class), CONT_ID_4));
        assertThat(m_SUT.getController(CONT_ID_4), is(notNullValue()));
        assertThat(m_SUT.getAllControllers().size(), is(4));
        assertThat(m_SUT.getController(CONT_ID_1).needsCleanupRequest(), is(true));
        assertThat(m_SUT.getController(CONT_ID_2).needsCleanupRequest(), is(true));
        assertThat(m_SUT.getController(CONT_ID_3).needsCleanupRequest(), is(true));
        assertThat(m_SUT.getController(CONT_ID_4).needsCleanupRequest(), is(true));
    }
@ Test public void testGetController ( ) { RemoteChannel chan = mock ( RemoteChannel . class ) ; List < RemoteChannel > setChanns = new ArrayList < RemoteChannel > ( ) ; setChanns . add ( chan ) ; setUpFourChannels ( setChanns ) ; m_ChannelHelper . handleEvent ( createBasicChannelUpdatedEvent ( mock ( RemoteChannel . class ) , CONT_ID_1 ) ) ; m_ChannelHelper . handleEvent ( createBasicChannelUpdatedEvent ( mock ( RemoteChannel . class ) , CONT_ID_2 ) ) ; m_ChannelHelper . handleEvent ( createBasicChannelUpdatedEvent ( mock ( RemoteChannel . class ) , CONT_ID_3 ) ) ; m_ChannelHelper . handleEvent ( createBasicChannelUpdatedEvent ( mock ( RemoteChannel . class ) , CONT_ID_4 ) ) ; assertThat ( m_SUT . getController ( CONT_ID_4 ) , is ( notNullValue ( ) ) ) ; assertThat ( m_SUT . getAllControllers ( ) . size ( ) , is ( 4 ) ) ; assertThat ( m_SUT . getController ( CONT_ID_1 ) . needsCleanupRequest ( ) , is ( true ) ) ; assertThat ( m_SUT . getController ( CONT_ID_2 ) . needsCleanupRequest ( ) , is ( true ) ) ; assertThat ( m_SUT . getController ( CONT_ID_3 ) . needsCleanupRequest ( ) , is ( true ) ) ; assertThat ( m_SUT . getController ( CONT_ID_4 ) . needsCleanupRequest ( ) , is ( true ) ) ; }
Test getting a controller by its ID.
Test getting a controller by its ID .
//mock remote channel lookup behavior //sets up the map of channels by controller ID //create 4 channels //get one controller //get all controllers, there should be the four just added