@Test
  public void testAttributes() {
    // these methods are basically just thin wrappers around a map, so no need to test too
    // thoroughly

    File file = RegularFile.create(0, fileTimeSource.now(), new HeapDisk(10, 10, 10));

    assertThat(file.getAttributeKeys()).isEmpty();
    assertThat(file.getAttribute("foo", "foo")).isNull();

    file.deleteAttribute("foo", "foo"); // doesn't throw

    file.setAttribute("foo", "foo", "foo");

    assertThat(file.getAttributeKeys()).containsExactly("foo:foo");
    assertThat(file.getAttribute("foo", "foo")).isEqualTo("foo");

    file.deleteAttribute("foo", "foo");

    assertThat(file.getAttributeKeys()).isEmpty();
    assertThat(file.getAttribute("foo", "foo")).isNull();
  }
Tests for {@link File}.

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