HtmlEditorServiceImpl implements HtmlEditorService { @Override public Path save(final Path path, final String content, final DefaultMetadata _metadata, final String _comment) { return vfsServices.write(path, content); } @Inject  HtmlEditorServiceImpl(final VFSService vfsServices,
                                 final DeleteService deleteService,
                                 final RenameService renameService,
                                 final CopyService copyService,
                                 final SaveAndRenameServiceImpl<String, DefaultMetadata> saveAndRenameService); @PostConstruct void init(); @Override void delete(final Path path,
                       final String comment); @Override Path rename(final Path path,
                       final String newName,
                       final String comment); @Override Path save(final Path path,
                     final String content,
                     final DefaultMetadata _metadata,
                     final String _comment); @Override Path copy(final Path path,
                     final String newName,
                     final String comment); @Override Path copy(final Path path,
                     final String newName,
                     final Path targetDirectory,
                     final String comment); @Override String load(final Path path); @Override Path saveAndRename(final Path path,
                              final String newFileName,
                              final DefaultMetadata metadata,
                              final String content,
                              final String comment);  }
@Test public void testSave() throws Exception { final Path expectedPath = mock(Path.class); doReturn(expectedPath).when(vfsServices).write(path, content); final Path actualPath = htmlEditorService.save(path, content, metadata, comment); verify(vfsServices).write(path, content); assertEquals(expectedPath, actualPath); }