### Question:
RequireJsBundleListener implements BundleListener { @Override public void bundleChanged( BundleEvent bundleEvent ) { if ( this.isListenerActive() ) { final Bundle bundle = bundleEvent.getBundle(); final int bundleEventType = bundleEvent.getType(); boolean shouldInvalidate = false; if ( bundleEventType == BundleEvent.STARTED ) { shouldInvalidate = addBundle( bundle ); } else if ( bundleEventType == BundleEvent.UNINSTALLED || bundleEventType == BundleEvent.UNRESOLVED || bundleEventType == BundleEvent.STOPPED ) { shouldInvalidate = removeBundle( bundle ); } if ( shouldInvalidate && this.isListenerActive() ) { this.requireJsConfigManager.invalidateCachedConfigurations(); } } }  void setBundleContext( BundleContext bundleContext ); void setRequireJsConfigManager( RequireJsConfigManager requireJsConfigManager ); void init(); void destroy(); Collection<IPlatformPluginRequireJsConfigurations> getScripts(); @Override void bundleChanged( BundleEvent bundleEvent ); boolean removeBundle( Bundle bundle ); static final String EXTERNAL_RESOURCES_JSON_PATH; static final String STATIC_RESOURCES_JSON_PATH; }### Answer:
@Test public void bundleStartedWithExternalResources() { Bundle mockBundleWithExternalResources = this.createMockExternalResourcesBundle( "lib3", "3.0", Bundle.ACTIVE ); BundleEvent event = this.createMockBundleEvent( mockBundleWithExternalResources, BundleEvent.STARTED ); this.requireJsBundleListener.bundleChanged( event ); verify( this.mockRequireJsConfigManager, times( 1 ) ).invalidateCachedConfigurations(); }