@Test(timeout = 10000)
public void testAwaitChange() throws InterruptedException {

    String file = FileOps.tempFile(FileOps.tempDir("con"), "foo", ".test");
    CountDownLatch latch = new CountDownLatch(1);
    Thread t = new Thread(() -> {
        FileOps.awaitChange(file);
        latch.countDown();
    });
    t.start();
    AtomicBoolean done = new AtomicBoolean(false);
    Thread t2 = new Thread(() -> {
        while (!done.get()) {
            // There is an arbitrary and uncontrollable delay between the
            // time that the path Thread t starting and the
            // FileOps#awaitChange method actually registering the path so
            // we just keep writing to the file so that, eventually, one of
            // the changes will be caught
            FileOps.write(Random.getSimpleString(), file);
        }
    });
    t2.start();
    latch.await();
    Assert.assertTrue(true);
    done.set(true);
}