PerspectiveServicesImpl implements PerspectiveServices { public Plugin getLayoutTemplatePlugin(String perspectiveName) { if (perspectiveName == null) { return null; } for (Plugin plugin : pluginServices.listPlugins(PluginType.PERSPECTIVE_LAYOUT)) { if (PluginType.PERSPECTIVE_LAYOUT.equals(plugin.getType()) && plugin.getName().equals(perspectiveName)) { return plugin; } } return null; } @Inject  PerspectiveServicesImpl(final PluginServicesImpl pluginServices,
                                   final LayoutServicesImpl layoutServices,
                                   final SaveAndRenameServiceImpl<LayoutTemplate, DefaultMetadata> saveAndRenameService); @PostConstruct void init(); @Override Plugin createNewPerspective(String name, LayoutTemplate.Style style); @Override Collection<LayoutTemplate> listLayoutTemplates(); @Override LayoutTemplate getLayoutTemplate(String perspectiveName); @Override LayoutTemplate getLayoutTemplate(Path perspectivePath); @Override LayoutTemplate getLayoutTemplate(Plugin perspectivePlugin); Plugin getLayoutTemplatePlugin(String perspectiveName); @Override Path saveLayoutTemplate(Path perspectivePath, LayoutTemplate layoutTemplate, String commitMessage); @Override LayoutTemplate convertToLayoutTemplate(String layoutModel); @Override Path copy(Path path, String newName, String comment); @Override Path copy(Path path, String newName, Path targetDirectory, String comment); @Override Path rename(Path path, String newName, String comment); @Override void delete(Path path, String comment); @Override Path save(final Path path,
                     final LayoutTemplate content,
                     final DefaultMetadata metadata,
                     final String comment); @Override Path saveAndRename(final Path path,
                              final String newFileName,
                              final DefaultMetadata metadata,
                              final LayoutTemplate content,
                              final String comment);  }
@Test public void testGetLayoutTemplatePlugin() { Plugin retPlugin = perspectiveServices.getLayoutTemplatePlugin(plugin.getName()); verify(pluginServices).listPlugins(PluginType.PERSPECTIVE_LAYOUT); }