mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/link/TestLinkLayerServiceProxy.java
@SuppressWarnings({"rawtypes", "unchecked"})
    @Test
    public void testDeactivate()
    {
        ServiceRegistration sReg = mock(ServiceRegistration.class);
        BundleContext bContext = mock(BundleContext.class);
        
        when(bContext.registerService(eq(EventHandler.class), 
                Mockito.any(EventHandler.class), Mockito.any(Dictionary.class))).thenReturn(sReg);

        m_SUT.activate(bContext);
        
        m_SUT.deactivate();
        
        verify(sReg).unregister();
    }
/**
     * Verify event handler is unregistered on deactivation.
     */
Verify event handler is unregistered on deactivation.
Verify event handler is unregistered on deactivation .
@SuppressWarnings({"rawtypes", "unchecked"})
    @Test
    public void testDeactivate()
    {
        ServiceRegistration sReg = mock(ServiceRegistration.class);
        BundleContext bContext = mock(BundleContext.class);
        when(bContext.registerService(eq(EventHandler.class), 
                Mockito.any(EventHandler.class), Mockito.any(Dictionary.class))).thenReturn(sReg);
        m_SUT.activate(bContext);
        m_SUT.deactivate();
        verify(sReg).unregister();
    }
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) @ Test public void testDeactivate ( ) { ServiceRegistration sReg = mock ( ServiceRegistration . class ) ; BundleContext bContext = mock ( BundleContext . class ) ; when ( bContext . registerService ( eq ( EventHandler . class ) , Mockito . any ( EventHandler . class ) , Mockito . any ( Dictionary . class ) ) ) . thenReturn ( sReg ) ; m_SUT . activate ( bContext ) ; m_SUT . deactivate ( ) ; verify ( sReg ) . unregister ( ) ; }
Verify event handler is unregistered on deactivation.
Verify event handler is unregistered on deactivation .