@Test
  public void testView() throws IOException {
    BasicFileAttributeView view = provider.view(fileLookup(), NO_INHERITED_VIEWS);

    assertThat(view).isNotNull();
    assertThat(view.name()).isEqualTo("basic");

    BasicFileAttributes attrs = view.readAttributes();
    assertThat(attrs.fileKey()).isEqualTo(0);

    FileTime initial = fileTimeSource.now();
    assertThat(attrs.creationTime()).isEqualTo(initial);
    assertThat(attrs.lastAccessTime()).isEqualTo(initial);
    assertThat(attrs.lastModifiedTime()).isEqualTo(initial);

    view.setTimes(null, null, null);

    assertThat(attrs.creationTime()).isEqualTo(initial);
    assertThat(attrs.lastAccessTime()).isEqualTo(initial);
    assertThat(attrs.lastModifiedTime()).isEqualTo(initial);

    view.setTimes(FileTime.fromMillis(0L), null, null);

    attrs = view.readAttributes();
    assertThat(attrs.creationTime()).isEqualTo(initial);
    assertThat(attrs.lastAccessTime()).isEqualTo(initial);
    assertThat(attrs.lastModifiedTime()).isEqualTo(FileTime.fromMillis(0L));
  }
Tests for {@link BasicAttributeProvider}.

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