public void shutdown() {
    log.info("Stopping file watcher from watching for changes: " + file);
    shutdown = true;
  }
@Test
  public void shouldShutdownAsync() throws Exception {
    watcher = new FileWatcher(filePath, callback);
    watcher.start();

    // When:
    watcher.shutdown();

    // Then:
    assertThatEventually(watcher::isAlive, is(false));
  }