@Test
  public void testRegister_fileIsNotDirectory() throws IOException {
    Path path = fs.getPath("/a.txt");
    Files.createFile(path);
    try {
      watcher.register(path, ImmutableList.of(ENTRY_CREATE));
      fail();
    } catch (NotDirectoryException expected) {
    }
  }
Tests for {@link PollingWatchService}.

@author Colin Decker
jimfs/src/test/java/com/google/common/jimfs/PollingWatchServiceTest.java