mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/channel/TestChannelMgrImpl.java
@Test
    public void testGetUnknownTransportLayerChannel()
    {
      //behavior for remote lookup
        TransportChannel remoteChan = createMockTransportChannel("transport", "localaddr-diff", 
                "remoteaddr", ChannelStatus.Unknown);

        TransportChannel remoteChan1 = createMockTransportChannel("transport", "localaddr", 
                "remoteaddr-diff", ChannelStatus.Unknown);
         
        TransportChannel remoteChan2 = createMockTransportChannel("transport", "localaddr", 
                "remoteaddr", ChannelStatus.Unknown);
       
        Set<RemoteChannel> setChans = new HashSet<RemoteChannel>();
        setChans.add(remoteChan);
        setChans.add(remoteChan1);
        setChans.add(remoteChan2);
        
        Map<Integer, Set<RemoteChannel>> channels = new HashMap<Integer, Set<RemoteChannel>>();
        channels.put(1596, setChans);
        when(m_RemoteChannelLookup.getAllChannels()).thenReturn(channels);
        
        TransportChannelModel transportChannel = m_SUT.getTransportLayerChannel("unknown-trnsprt", 
                "unknown-localaddr", "unknown-remoteAddr");
    
        assertThat(transportChannel, nullValue());
    }
/**
     * Verify that trying to get an unknown transport layer channel will return null.
     * Remote channel lookup has channels but not the unknown transport channel.
     */
Verify that trying to get an unknown transport layer channel will return null.
Remote channel lookup has channels but not the unknown transport channel.
Verify that trying to get an unknown transport layer channel will return null . Remote channel lookup has channels but not the unknown transport channel .
@Test
    public void testGetUnknownTransportLayerChannel()
    {
        TransportChannel remoteChan = createMockTransportChannel("transport", "localaddr-diff", 
                "remoteaddr", ChannelStatus.Unknown);
        TransportChannel remoteChan1 = createMockTransportChannel("transport", "localaddr", 
                "remoteaddr-diff", ChannelStatus.Unknown);
        TransportChannel remoteChan2 = createMockTransportChannel("transport", "localaddr", 
                "remoteaddr", ChannelStatus.Unknown);
        Set<RemoteChannel> setChans = new HashSet<RemoteChannel>();
        setChans.add(remoteChan);
        setChans.add(remoteChan1);
        setChans.add(remoteChan2);
        Map<Integer, Set<RemoteChannel>> channels = new HashMap<Integer, Set<RemoteChannel>>();
        channels.put(1596, setChans);
        when(m_RemoteChannelLookup.getAllChannels()).thenReturn(channels);
        TransportChannelModel transportChannel = m_SUT.getTransportLayerChannel("unknown-trnsprt", 
                "unknown-localaddr", "unknown-remoteAddr");
        assertThat(transportChannel, nullValue());
    }
@ Test public void testGetUnknownTransportLayerChannel ( ) { TransportChannel remoteChan = createMockTransportChannel ( "transport" , "localaddr-diff" , "remoteaddr" , ChannelStatus . Unknown ) ; TransportChannel remoteChan1 = createMockTransportChannel ( "transport" , "localaddr" , "remoteaddr-diff" , ChannelStatus . Unknown ) ; TransportChannel remoteChan2 = createMockTransportChannel ( "transport" , "localaddr" , "remoteaddr" , ChannelStatus . Unknown ) ; Set < RemoteChannel > setChans = new HashSet < RemoteChannel > ( ) ; setChans . add ( remoteChan ) ; setChans . add ( remoteChan1 ) ; setChans . add ( remoteChan2 ) ; Map < Integer , Set < RemoteChannel > > channels = new HashMap < Integer , Set < RemoteChannel > > ( ) ; channels . put ( 1596 , setChans ) ; when ( m_RemoteChannelLookup . getAllChannels ( ) ) . thenReturn ( channels ) ; TransportChannelModel transportChannel = m_SUT . getTransportLayerChannel ( "unknown-trnsprt" , "unknown-localaddr" , "unknown-remoteAddr" ) ; assertThat ( transportChannel , nullValue ( ) ) ; }
Verify that trying to get an unknown transport layer channel will return null.
Verify that trying to get an unknown transport layer channel will return null .
//behavior for remote lookup