### Question:
FileManager extends AbstractManager implements IFileManager { @Override public ProcessHandle<Void> add(final Path file) throws NoSessionException, NoPeerConnectionException { logger.debug("ADD - {}", file); IProcessComponent<Void> component = getH2HFileManager().createAddProcess(file.toFile()); ProcessHandle<Void> handle = new ProcessHandle<Void>(component); return handle; } @Inject  FileManager(final INodeManager nodeManager, final UserConfig userConfig); @Override ProcessHandle<Void> add(final Path file); @Override ProcessHandle<Void> update(final Path file); @Override ProcessHandle<Void> delete(final Path file); @Override ProcessHandle<Void> move(final Path source, final Path destination); @Override ProcessHandle<Void> download(final Path file); @Override ProcessHandle<Void> recover(final Path file, final IVersionSelector versionSelector); @Override ProcessHandle<Void> share(final Path folder, final String userId, final PermissionType permission); @Override ProcessHandle<FileNode> listFiles(); @Override boolean existsRemote(final Path path); @Override boolean isSmallFile(final Path path); @Override boolean isLargeFile(final Path path);  }### Answer:
@Test public void testAdd() throws NoSessionException, NoPeerConnectionException { Mockito.stub(h2hFileManager.createAddProcess(any())).toReturn(process); ProcessHandle<Void> p = fileManager.add(file); assertNotNull(p); assertNotNull(p.getProcess()); assertEquals(process, p.getProcess()); Mockito.verify(h2hFileManager, times(1)).createAddProcess(file.toFile()); Mockito.verifyNoMoreInteractions(h2hFileManager); }