SummaryPage extends BaseDecisionTableColumnPage { List<DecisionTableColumnPlugin> sortByTitle(final List<DecisionTableColumnPlugin> plugins) { final ArrayList<DecisionTableColumnPlugin> sortedPlugins = new ArrayList<>(plugins); sortedPlugins.sort((plugin1, plugin2) -> { return plugin1.getTitle().compareTo(plugin2.getTitle()); }); return sortedPlugins; } @Inject  SummaryPage(final ManagedInstance<DecisionTableColumnPlugin> pluginManagedInstance,
                       final View view,
                       final TranslationService translationService); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); @Override void prepareView(); @PostConstruct void loadPlugins();  }
@Test public void testPluginsSortedByTitle() { final List<String> expectedTitles = Arrays.asList("Plugin A", "Plugin B", "Plugin C"); final List<String> actualTitles = mapTitles(page.sortByTitle(new ArrayList<DecisionTableColumnPlugin>() {{ add(pluginMock("Plugin A")); add(pluginMock("Plugin C")); add(pluginMock("Plugin B")); }})); assertEquals(expectedTitles, actualTitles); }