@Test
  public void testOpenFileAttributeViewsThrow() throws IOException {
    Path p = fs.getPath("/foo");
    Files.createFile(p);

    BasicFileAttributeView view = Files.getFileAttributeView(p, BasicFileAttributeView.class);

    fs.close();

    try {
      view.readAttributes();
      fail();
    } catch (ClosedFileSystemException expected) {
    }

    try {
      view.setTimes(null, null, null);
      fail();
    } catch (ClosedFileSystemException expected) {
    }
  }
Tests for what happens when a file system is closed.

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