mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/controller/TestControllerMgrImpl.java
private RemoteChannel addChannelMockHelper(int systemId)
    {
        //mock 
        RemoteChannel channel = mock(RemoteChannel.class); 
        when(m_ChannelLookup.getChannel(systemId)).thenReturn(channel);
        
        //mock remote channel lookup behavior
        List<RemoteChannel> setChanns = new ArrayList<RemoteChannel>();
        setChanns.add(channel);
        when(m_ChannelLookup.getChannels(systemId)).thenReturn(setChanns);
        
        //mock that controller has a channel once
        Map<Integer, Set<RemoteChannel>> channels = new HashMap<Integer, Set<RemoteChannel>>();
        channels.put(systemId, new HashSet<RemoteChannel>(setChanns));
        when(m_ChannelLookup.getAllChannels()).thenReturn(channels);
        
        return channel;
    }
/**
     * Helper method for mocking the channel lookup functionalities for a particular system.  
     * @param systemId
     *      ID of the system
     * @return 
     *      the mocked channel being used in the channel lookup. Usually needed for event properties.
     */
Helper method for mocking the channel lookup functionalities for a particular system.
@param systemId
ID of the system
@return
the mocked channel being used in the channel lookup. Usually needed for event properties.
Helper method for mocking the channel lookup functionalities for a particular system . @param systemId ID of the system @return the mocked channel being used in the channel lookup . Usually needed for event properties .
private RemoteChannel addChannelMockHelper(int systemId)
    {
        RemoteChannel channel = mock(RemoteChannel.class); 
        when(m_ChannelLookup.getChannel(systemId)).thenReturn(channel);
        remote channel lookup behavior
        List<RemoteChannel> setChanns = new ArrayList<RemoteChannel>();
        setChanns.add(channel);
        when(m_ChannelLookup.getChannels(systemId)).thenReturn(setChanns);
        that controller has a channel once
        Map<Integer, Set<RemoteChannel>> channels = new HashMap<Integer, Set<RemoteChannel>>();
        channels.put(systemId, new HashSet<RemoteChannel>(setChanns));
        when(m_ChannelLookup.getAllChannels()).thenReturn(channels);
        return channel;
    }
private RemoteChannel addChannelMockHelper ( int systemId ) { RemoteChannel channel = mock ( RemoteChannel . class ) ; when ( m_ChannelLookup . getChannel ( systemId ) ) . thenReturn ( channel ) ; List < RemoteChannel > setChanns = new ArrayList < RemoteChannel > ( ) ; setChanns . add ( channel ) ; when ( m_ChannelLookup . getChannels ( systemId ) ) . thenReturn ( setChanns ) ; Map < Integer , Set < RemoteChannel > > channels = new HashMap < Integer , Set < RemoteChannel > > ( ) ; channels . put ( systemId , new HashSet < RemoteChannel > ( setChanns ) ) ; when ( m_ChannelLookup . getAllChannels ( ) ) . thenReturn ( channels ) ; return channel ; }
Helper method for mocking the channel lookup functionalities for a particular system.
Helper method for mocking the channel lookup functionalities for a particular system .
//mock  //mock remote channel lookup behavior //mock that controller has a channel once