@Test
  public void testFileSystemWithCustomWatchServicePollingInterval() throws IOException {
    FileSystem fs =
        Jimfs.newFileSystem(
            Configuration.unix().toBuilder()
                .setWatchServiceConfiguration(polling(10, MILLISECONDS))
                .build());

    WatchService watchService = fs.newWatchService();
    assertThat(watchService).isInstanceOf(PollingWatchService.class);

    PollingWatchService pollingWatchService = (PollingWatchService) watchService;
    assertThat(pollingWatchService.interval).isEqualTo(10);
    assertThat(pollingWatchService.timeUnit).isEqualTo(MILLISECONDS);
  }
Tests for {@link Configuration}, {@link Configuration.Builder} and file systems created from
them.

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