mil.dod.th.ose.gui.remote.encryption/test/mil/dod/th/ose/gui/remotesystemencryption/TestRemoteSystemEncryptionImpl.java
@Test
    public void testCleanupWithStillKnownSystem()
    {
        m_SUT.addEncryptionTypeForSystem(123, EncryptType.AES_ECDH_ECDSA);
        
        assertThat(m_SUT.getEncryptType(123), is(EncryptType.AES_ECDH_ECDSA));
        
        RemoteChannel channel = mock(RemoteChannel.class);
        List<RemoteChannel> list = new ArrayList<RemoteChannel>();
        list.add(channel);
        
        when(m_ChannelLookup.getChannels(123)).thenReturn(list);
        
        m_SUT.cleanupSystemEncryptionTypes();
        
        assertThat(m_SUT.getEncryptType(123), is(EncryptType.AES_ECDH_ECDSA));
    }
/**
     * Verify that if a system is still known by the remote encryption service then 
     * it should not be removed from the list of encryption entries.
     */
Verify that if a system is still known by the remote encryption service then
it should not be removed from the list of encryption entries.
Verify that if a system is still known by the remote encryption service then it should not be removed from the list of encryption entries .
@Test
    public void testCleanupWithStillKnownSystem()
    {
        m_SUT.addEncryptionTypeForSystem(123, EncryptType.AES_ECDH_ECDSA);
        assertThat(m_SUT.getEncryptType(123), is(EncryptType.AES_ECDH_ECDSA));
        RemoteChannel channel = mock(RemoteChannel.class);
        List<RemoteChannel> list = new ArrayList<RemoteChannel>();
        list.add(channel);
        when(m_ChannelLookup.getChannels(123)).thenReturn(list);
        m_SUT.cleanupSystemEncryptionTypes();
        assertThat(m_SUT.getEncryptType(123), is(EncryptType.AES_ECDH_ECDSA));
    }
@ Test public void testCleanupWithStillKnownSystem ( ) { m_SUT . addEncryptionTypeForSystem ( 123 , EncryptType . AES_ECDH_ECDSA ) ; assertThat ( m_SUT . getEncryptType ( 123 ) , is ( EncryptType . AES_ECDH_ECDSA ) ) ; RemoteChannel channel = mock ( RemoteChannel . class ) ; List < RemoteChannel > list = new ArrayList < RemoteChannel > ( ) ; list . add ( channel ) ; when ( m_ChannelLookup . getChannels ( 123 ) ) . thenReturn ( list ) ; m_SUT . cleanupSystemEncryptionTypes ( ) ; assertThat ( m_SUT . getEncryptType ( 123 ) , is ( EncryptType . AES_ECDH_ECDSA ) ) ; }
Verify that if a system is still known by the remote encryption service then
 it should not be removed from the list of encryption entries.
Verify that if a system is still known by the remote encryption service then it should not be removed from the list of encryption entries .