mil.dod.th.ose.gui.remote.encryption/test/mil/dod/th/ose/gui/remotesystemencryption/TestEncryptionTypeManagerImpl.java
@Test
    public void testEncryptionResponseMsgKnownSystemAndUnchangedType()
    {
        int controllerId = 123;
        
        when(m_RemoteSystemEncryption.getEncryptType(controllerId)).thenReturn(EncryptType.AES_ECDH_ECDSA);
        
        //mock encryption response for new controller
        Event event = mockEncryptionTypeResponse(controllerId, EncryptType.AES_ECDH_ECDSA);
        m_EncryptionInfoEventHelper.handleEvent(event);
        
        verify(m_EventAdmin, never()).postEvent(Mockito.any(Event.class));
        verify(m_RemoteSystemEncryption, never()).addEncryptionTypeForSystem(controllerId, EncryptType.AES_ECDH_ECDSA);
    }
/**
     * Verify that an encryption type response for an known system that has not changed its encryption type
     * does not generate an encrypt type updated event and the entry is not saved to the 
     * remote system encryption service.
     */
Verify that an encryption type response for an known system that has not changed its encryption type
does not generate an encrypt type updated event and the entry is not saved to the
remote system encryption service.
Verify that an encryption type response for an known system that has not changed its encryption type does not generate an encrypt type updated event and the entry is not saved to the remote system encryption service .
@Test
    public void testEncryptionResponseMsgKnownSystemAndUnchangedType()
    {
        int controllerId = 123;
        when(m_RemoteSystemEncryption.getEncryptType(controllerId)).thenReturn(EncryptType.AES_ECDH_ECDSA);
        Event event = mockEncryptionTypeResponse(controllerId, EncryptType.AES_ECDH_ECDSA);
        m_EncryptionInfoEventHelper.handleEvent(event);
        verify(m_EventAdmin, never()).postEvent(Mockito.any(Event.class));
        verify(m_RemoteSystemEncryption, never()).addEncryptionTypeForSystem(controllerId, EncryptType.AES_ECDH_ECDSA);
    }
@ Test public void testEncryptionResponseMsgKnownSystemAndUnchangedType ( ) { int controllerId = 123 ; when ( m_RemoteSystemEncryption . getEncryptType ( controllerId ) ) . thenReturn ( EncryptType . AES_ECDH_ECDSA ) ; Event event = mockEncryptionTypeResponse ( controllerId , EncryptType . AES_ECDH_ECDSA ) ; m_EncryptionInfoEventHelper . handleEvent ( event ) ; verify ( m_EventAdmin , never ( ) ) . postEvent ( Mockito . any ( Event . class ) ) ; verify ( m_RemoteSystemEncryption , never ( ) ) . addEncryptionTypeForSystem ( controllerId , EncryptType . AES_ECDH_ECDSA ) ; }
Verify that an encryption type response for an known system that has not changed its encryption type
 does not generate an encrypt type updated event and the entry is not saved to the
 remote system encryption service.
Verify that an encryption type response for an known system that has not changed its encryption type does not generate an encrypt type updated event and the entry is not saved to the remote system encryption service .
//mock encryption response for new controller