### Question:
SpoonPluginManager implements PluginTypeListener { public void notifyLifecycleListeners( SpoonLifecycleListener.SpoonLifeCycleEvent evt ) { for ( SpoonPluginInterface p : plugins.values() ) { SpoonLifecycleListener listener = p.getLifecycleListener(); if ( listener != null ) { listener.onEvent( evt ); } } } private  SpoonPluginManager(); @Override void pluginAdded( final Object serviceObject ); @Override void pluginRemoved( Object serviceObject ); @Override void pluginChanged( Object serviceObject ); static SpoonPluginManager getInstance(); void applyPluginsForContainer( final String category, final XulDomContainer container ); List<SpoonPluginInterface> getPlugins(); void notifyLifecycleListeners( SpoonLifecycleListener.SpoonLifeCycleEvent evt );  }### Answer:
@Test public void testNotifyLifecycleListeners() throws Exception { spoonPluginManager.pluginAdded( plugin1 ); spoonPluginManager.pluginAdded( plugin2 ); spoonPluginManager.notifyLifecycleListeners( SpoonLifecycleListener.SpoonLifeCycleEvent.STARTUP ); assertEquals( 2, notifications.get() ); }