mil.dod.th.ose.config/test/mil/dod/th/ose/config/loading/impl/TestFactoryObjectLoaderImpl.java
@Test
    public void testProcessPendingDataStreams() throws InvalidSyntaxException
    {
        // Data stream service is not available yet
        m_SUT.unsetDataStreamService(null);

        // First run
        m_SUT.process(createConfigList(), true);

        // Post factory object loaded events
        m_EventAdmin.postEvent(m_FactoryObjectEvent);
        m_EventAdmin.postEvent(m_FactoryObjectEvent);

        // Data stream service is now available
        m_SUT.setDataStreamService(mock(DataStreamService.class));

        m_EventAdmin.postEvent(m_FactoryObjectEvent);

        verify(m_Context, times(3)).addServiceListener(any(ServiceListener.class), anyString());
    }
/**
     * Test that service trackers are created for all {@link mil.dod.th.model.config.FactoryObjectConfig} objects when
     * the data streaming service is not yet available, but is set later after initial processing.
     */
Test that service trackers are created for all  mil.dod.th.model.config.FactoryObjectConfig objects when
the data streaming service is not yet available, but is set later after initial processing.
Test that service trackers are created for all mil . dod . th . model . config . FactoryObjectConfig objects when the data streaming service is not yet available but is set later after initial processing .
@Test
    public void testProcessPendingDataStreams() throws InvalidSyntaxException
    {
        m_SUT.unsetDataStreamService(null);
        m_SUT.process(createConfigList(), true);
        m_EventAdmin.postEvent(m_FactoryObjectEvent);
        m_EventAdmin.postEvent(m_FactoryObjectEvent);
        m_SUT.setDataStreamService(mock(DataStreamService.class));
        m_EventAdmin.postEvent(m_FactoryObjectEvent);
        verify(m_Context, times(3)).addServiceListener(any(ServiceListener.class), anyString());
    }
@ Test public void testProcessPendingDataStreams ( ) throws InvalidSyntaxException { m_SUT . unsetDataStreamService ( null ) ; m_SUT . process ( createConfigList ( ) , true ) ; m_EventAdmin . postEvent ( m_FactoryObjectEvent ) ; m_EventAdmin . postEvent ( m_FactoryObjectEvent ) ; m_SUT . setDataStreamService ( mock ( DataStreamService . class ) ) ; m_EventAdmin . postEvent ( m_FactoryObjectEvent ) ; verify ( m_Context , times ( 3 ) ) . addServiceListener ( any ( ServiceListener . class ) , anyString ( ) ) ; }
Test that service trackers are created for all {@link mil.dod.th.model.config.FactoryObjectConfig} objects when
 the data streaming service is not yet available, but is set later after initial processing.
Test that service trackers are created for all { @link mil . dod . th . model . config . FactoryObjectConfig } objects when the data streaming service is not yet available but is set later after initial processing .
// Data stream service is not available yet // First run // Post factory object loaded events // Data stream service is now available