mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/channel/TestChannelMgrImpl.java
@Test
    public void testGetUnknownSocketChannel()
    {
        //mocking
        SocketChannel socChannel = createMockSocketChannel("localhost", 3001, ChannelStatus.Unknown);
        
        Set<RemoteChannel> setChans = new HashSet<RemoteChannel>();
        setChans.add(socChannel);
        
        Map<Integer, Set<RemoteChannel>> channels = new HashMap<Integer, Set<RemoteChannel>>();
        channels.put(1957, setChans);
        when(m_RemoteChannelLookup.getAllChannels()).thenReturn(channels);
        
        SocketChannelModel socket = m_SUT.getSocketChannel("unknown-host", 444);
        assertThat(socket, nullValue());
    }
/**
     * Verify that with an unknown host name and port returns null for the 
     * requested inputs.
     */
Verify that with an unknown host name and port returns null for the
requested inputs.
Verify that with an unknown host name and port returns null for the requested inputs .
@Test
    public void testGetUnknownSocketChannel()
    {
        SocketChannel socChannel = createMockSocketChannel("localhost", 3001, ChannelStatus.Unknown);
        Set<RemoteChannel> setChans = new HashSet<RemoteChannel>();
        setChans.add(socChannel);
        Map<Integer, Set<RemoteChannel>> channels = new HashMap<Integer, Set<RemoteChannel>>();
        channels.put(1957, setChans);
        when(m_RemoteChannelLookup.getAllChannels()).thenReturn(channels);
        SocketChannelModel socket = m_SUT.getSocketChannel("unknown-host", 444);
        assertThat(socket, nullValue());
    }
@ Test public void testGetUnknownSocketChannel ( ) { SocketChannel socChannel = createMockSocketChannel ( "localhost" , 3001 , ChannelStatus . Unknown ) ; Set < RemoteChannel > setChans = new HashSet < RemoteChannel > ( ) ; setChans . add ( socChannel ) ; Map < Integer , Set < RemoteChannel > > channels = new HashMap < Integer , Set < RemoteChannel > > ( ) ; channels . put ( 1957 , setChans ) ; when ( m_RemoteChannelLookup . getAllChannels ( ) ) . thenReturn ( channels ) ; SocketChannelModel socket = m_SUT . getSocketChannel ( "unknown-host" , 444 ) ; assertThat ( socket , nullValue ( ) ) ; }
Verify that with an unknown host name and port returns null for the
 requested inputs.
Verify that with an unknown host name and port returns null for the requested inputs .
//mocking