PerspectiveServicesImpl implements PerspectiveServices { @Override public Path saveAndRename(final Path path, final String newFileName, final DefaultMetadata metadata, final LayoutTemplate content, final String comment) { return saveAndRenameService.saveAndRename(path, newFileName, metadata, content, comment); } @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 testSaveAndRename() { final String comment = "comment"; final String newFileName = "newFileName"; final LayoutTemplate content = new LayoutTemplate("name"); perspectiveServices.saveAndRename(path, newFileName, metadata, content, comment); verify(saveAndRenameService).saveAndRename(path, newFileName, metadata, content, comment); }