    @Test
    public void shouldNotCloseAccessManagerFactoryTrackerOnStopBecauseNotOpened() throws Exception {

        BundleContext bundleContext = mock(BundleContext.class);

        final AccessManagerFactoryTracker accessManagerFactoryTracker = mock(AccessManagerFactoryTracker.class);

        Activator activator = new Activator() {
            @Override
            protected AccessManagerFactoryTracker getAccessManagerFactoryTracker() {
                return null;
            }
        };

        activator.stop(bundleContext);

        verify(accessManagerFactoryTracker, never()).close();
    }