@Test
  public void testCreateFiles_withSupplier() {
    File file = factory.directoryCreator().get();
    assertThat(file.id()).isEqualTo(0L);
    assertThat(file.isDirectory()).isTrue();
    assertThat(file.getCreationTime()).isEqualTo(fileTimeSource.now());

    fileTimeSource.randomize();
    file = factory.regularFileCreator().get();
    assertThat(file.id()).isEqualTo(1L);
    assertThat(file.isRegularFile()).isTrue();
    assertThat(file.getCreationTime()).isEqualTo(fileTimeSource.now());

    fileTimeSource.randomize();
    file = factory.symbolicLinkCreator(fakePath()).get();
    assertThat(file.id()).isEqualTo(2L);
    assertThat(file.isSymbolicLink()).isTrue();
    assertThat(file.getCreationTime()).isEqualTo(fileTimeSource.now());
  }
Tests for {@link FileFactory}.

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