@Override public void pluginRemoved( Object serviceObject ) {
    SpoonPluginInterface spoonPluginInterface = plugins.get( serviceObject );
    if ( spoonPluginInterface == null ) {
      return;
    }

    SpoonPluginCategories categories = spoonPluginInterface.getClass().getAnnotation( SpoonPluginCategories.class );
    if ( categories != null ) {
      for ( String cat : categories.value() ) {
        List<SpoonPluginInterface> categoryList = pluginCategoryMap.get( cat );
        categoryList.remove( spoonPluginInterface );
      }
    }

    if ( spoonPluginInterface.getPerspective() != null ) {
      getSpoonPerspectiveManager().removePerspective( spoonPluginInterface.getPerspective() );
    }

    plugins.remove( serviceObject );
  }
@Test
  public void testPluginRemoved() throws Exception {
    spoonPluginManager.pluginAdded( plugin1 );
    spoonPluginManager.pluginRemoved( plugin1 );

    verify( spoonPerspectiveManager ).removePerspective( spoonPerspective );
  }