TestFileUtil.createRandomFile(largeFile, 50*1024*1024);
fileWrittenTime.set(System.currentTimeMillis());
// Stop watcher (close watches)
Thread.sleep(400); // Wait for the watcher to fire an event
watcher.stop();
// Test
assertNotSame(0L, watcherEventOccurredTime.get());
assertEquals(1, watcherEventOccurredCount.get());
assertNotSame(0L, fileWrittenTime.get());