### Question:
DefaultFileSystemWatcher implements FileWatcher { @Override public void close() throws IOException { stopWatching(); watchService.close(); } DefaultFileSystemWatcher( WatchService watchService ); @Override WatchedResource watch( File file ); @Override void startWatching(); @Override void stopWatching(); @Override void addFileWatchEventListener( FileWatchEventListener listener ); @Override void removeFileWatchEventListener( FileWatchEventListener listener ); @Override void close();  }### Answer:
@Test void stopWatchingAndCloseEverythingOnClosed() throws IOException { TestFileSystemWatcher watcher = createWatcher(); watcher.close(); verify( watchServiceMock ).close(); assertTrue( watcher.isClosed() ); }