mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/impl/TestFactoryDescriptorImpl.java
@SuppressWarnings({"unchecked"})
    @Test
    public void testUnavailable() throws InterruptedException, UnmarshalException
    {
        m_SUT.registerServices();
        m_SUT.makeAvailable();
        
        verify(coreBundleContext, timeout(3000)).registerService(eq(FactoryDescriptor.class), eq(m_SUT), 
                Mockito.any(Dictionary.class));

        m_SUT.makeUnavailable();
        verify(descriptorServiceReg).unregister();
        verify(metaServiceReg, never()).unregister(); // should only unregister descriptor registration
    }
/*
     * Verify that the factory service is unregistered.
     */
Verify that the factory service is unregistered.
Verify that the factory service is unregistered .
@SuppressWarnings({"unchecked"})
    @Test
    public void testUnavailable() throws InterruptedException, UnmarshalException
    {
        m_SUT.registerServices();
        m_SUT.makeAvailable();
        verify(coreBundleContext, timeout(3000)).registerService(eq(FactoryDescriptor.class), eq(m_SUT), 
                Mockito.any(Dictionary.class));
        m_SUT.makeUnavailable();
        verify(descriptorServiceReg).unregister();
        verify(metaServiceReg, never()).unregister(); 
    }
@ SuppressWarnings ( { "unchecked" } ) @ Test public void testUnavailable ( ) throws InterruptedException , UnmarshalException { m_SUT . registerServices ( ) ; m_SUT . makeAvailable ( ) ; verify ( coreBundleContext , timeout ( 3000 ) ) . registerService ( eq ( FactoryDescriptor . class ) , eq ( m_SUT ) , Mockito . any ( Dictionary . class ) ) ; m_SUT . makeUnavailable ( ) ; verify ( descriptorServiceReg ) . unregister ( ) ; verify ( metaServiceReg , never ( ) ) . unregister ( ) ; }
Verify that the factory service is unregistered.
Verify that the factory service is unregistered .
// should only unregister descriptor registration