### Question:
FeatureActionsPlugin extends AbstractServicePlugin { @Override protected Collection<Service> getServices(PluginLoaderData plugindata, Toolbox toolbox) { myToolbox = toolbox; FeatureActionsRegistry registry = new FeatureActionsRegistry(toolbox.getPreferencesRegistry()); FeatureActionsToolbox pluginToolbox = new FeatureActionsToolbox(registry); FeatureActionsController controller = new FeatureActionsController(toolbox, registry); myStateController = new FeatureActionStateController(registry, MantleToolboxUtils.getMantleToolbox(toolbox).getDataGroupController()); ActionEditorDisplayer displayer = new ActionEditorDisplayerImpl(toolbox, registry); UIRegistry uiRegistry = toolbox.getUIRegistry(); myEditorMenuProvider = new FeatureActionsMenuProvider(displayer, uiRegistry); uiRegistry.getContextActionManager().registerContextMenuItemProvider(DataGroupInfo.ACTIVE_DATA_CONTEXT, DataGroupContextKey.class, myEditorMenuProvider); toolbox.getModuleStateManager().registerModuleStateController("Feature Action", myStateController); myClearFeaturesMenuProvider = new ContextMenuProvider<>() { @Override public List<JMenuItem> getMenuItems(String contextId, Void key) { JMenuItem clearFeatures = new JMenuItem("Clear Feature Actions"); clearFeatures.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { registry.clearAll(); } }); return Collections.singletonList(clearFeatures); } @Override public int getPriority() { return 9; } }; toolbox.getUIRegistry().getContextActionManager().registerContextMenuItemProvider(ContextIdentifiers.DELETE_CONTEXT, Void.class, myClearFeaturesMenuProvider); myFeatureActionManagerButton = new FeatureActionAlertButton(null); myFeatureActionManagerButton.addActionListener(e -> showFeatureActionManager(toolbox, registry)); EventQueueUtilities.invokeLater(() -> toolbox.getUIRegistry().getToolbarComponentRegistry().registerToolbarComponent( ToolbarLocation.SOUTH, "FeatureActionManager", myFeatureActionManagerButton, 202, SeparatorLocation.NONE)); myFeatureActionManagerButton.setIcons(); MantleToolboxUtils.getMantleToolbox(toolbox).getDataGroupController().addActivationListener(myActivationListener); return New.list(toolbox.getPluginToolboxRegistry().getRegistrationService(pluginToolbox), controller); }    }### Answer:
@Test public void testGetServices() { EasyMockSupport support = new EasyMockSupport(); Service pluginService = support.createMock(Service.class); Toolbox toolbox = createToolbox(support, pluginService); support.replayAll(); FeatureActionsPlugin plugin = new FeatureActionsPlugin(); Collection<Service> services = plugin.getServices(null, toolbox); assertEquals(2, services.size()); Iterator<Service> iterator = services.iterator(); assertEquals(pluginService, iterator.next()); assertTrue(iterator.next() instanceof FeatureActionsController); System.gc(); assertNotNull(myListener.get()); support.verifyAll(); }