SaveAndRenameServiceImpl implements SupportsSaveAndRename<T, M> { @Override public Path rename(final Path path, final String newFileName, final String comment) { return updateService.rename(path, newFileName, comment); }  void init(final SupportsSaveAndRename<T, M> updateService); @Override Path rename(final Path path,
                       final String newFileName,
                       final String comment); @Override Path save(final Path path,
                     final T content,
                     final M metadata,
                     final String comment); @Override Path saveAndRename(final Path path,
                              final String newFileName,
                              final M metadata,
                              final T content,
                              final String comment);  }
@Test public void testRename() throws Exception { final Path path = mock(Path.class); final String newFileName = "newFileName"; final String comment = "comment"; service.rename(path, newFileName, comment); verify(supportsSaveAndRename).rename(path, newFileName, comment); }