mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/TestRemoteChannelLookupImpl.java
@Test
    public void testSyncChannel()
    {
        // mock channel used for input
        RemoteChannel channel = mock(RemoteChannel.class);
        
        int systemId = 100;
        
        // sync channel
        m_SUT.syncChannel(channel, systemId);
        
        // verify channel is the same as one sent in
        assertThat(m_SUT.getChannel(systemId), is(channel));
        
        // sync to a different system id, shouldn't be available at the old one anymore
        int otherSystemId = 200;
        m_SUT.syncChannel(channel, otherSystemId);
        
        // verify no longer associated with old one, but is with new one
        assertThat(m_SUT.getChannels(systemId).size(), is(0));
        assertThat(m_SUT.getChannels(otherSystemId).size(), is(1));
        assertThat(m_SUT.getChannel(otherSystemId), is(channel));
        
        // sync to same channel again
        m_SUT.syncChannel(channel, otherSystemId);
        
        // verify same amount of channels in list
        assertThat(m_SUT.getChannels(otherSystemId).size(), is(1));
    }
/**
     * Verify syncing a channel will allow it to be retrieved later.
     * 
     * Verify syncing channel to a new id is handled correctly (should move channel)
     */
Verify syncing a channel will allow it to be retrieved later.

Verify syncing channel to a new id is handled correctly (should move channel)
Verify syncing a channel will allow it to be retrieved later . Verify syncing channel to a new id is handled correctly ( should move channel )
@Test
    public void testSyncChannel()
    {
        RemoteChannel channel = mock(RemoteChannel.class);
        int systemId = 100;
        m_SUT.syncChannel(channel, systemId);
        assertThat(m_SUT.getChannel(systemId), is(channel));
        int otherSystemId = 200;
        m_SUT.syncChannel(channel, otherSystemId);
        assertThat(m_SUT.getChannels(systemId).size(), is(0));
        assertThat(m_SUT.getChannels(otherSystemId).size(), is(1));
        assertThat(m_SUT.getChannel(otherSystemId), is(channel));
        m_SUT.syncChannel(channel, otherSystemId);
        assertThat(m_SUT.getChannels(otherSystemId).size(), is(1));
    }
@ Test public void testSyncChannel ( ) { RemoteChannel channel = mock ( RemoteChannel . class ) ; int systemId = 100 ; m_SUT . syncChannel ( channel , systemId ) ; assertThat ( m_SUT . getChannel ( systemId ) , is ( channel ) ) ; int otherSystemId = 200 ; m_SUT . syncChannel ( channel , otherSystemId ) ; assertThat ( m_SUT . getChannels ( systemId ) . size ( ) , is ( 0 ) ) ; assertThat ( m_SUT . getChannels ( otherSystemId ) . size ( ) , is ( 1 ) ) ; assertThat ( m_SUT . getChannel ( otherSystemId ) , is ( channel ) ) ; m_SUT . syncChannel ( channel , otherSystemId ) ; assertThat ( m_SUT . getChannels ( otherSystemId ) . size ( ) , is ( 1 ) ) ; }
Verify syncing a channel will allow it to be retrieved later.
Verify syncing a channel will allow it to be retrieved later .
// mock channel used for input // sync channel // verify channel is the same as one sent in // sync to a different system id, shouldn't be available at the old one anymore // verify no longer associated with old one, but is with new one // sync to same channel again // verify same amount of channels in list