@Test
public void should_trigger_a_modified_event_when_a_file_is_modified() throws Exception {

    Path existingFile = Files.createFile(subDirectory.resolve("file"));
    PathListenerStub listener = new PathListenerStub();
    watcher.watch(folder.toPath(), listener);
    Files.write(existingFile, "hello".getBytes(), StandardOpenOption.APPEND);
    await().until(changedFilesContainsExactly(listener, existingFile));
}