@Test
  public void testFileSystemMethodsThrow() throws IOException {
    fs.close();

    try {
      fs.getPath("/foo");
      fail();
    } catch (ClosedFileSystemException expected) {
    }

    try {
      fs.getRootDirectories();
      fail();
    } catch (ClosedFileSystemException expected) {
    }

    try {
      fs.getFileStores();
      fail();
    } catch (ClosedFileSystemException expected) {
    }

    try {
      fs.getPathMatcher("glob:*.java");
      fail();
    } catch (ClosedFileSystemException expected) {
    }

    try {
      fs.getUserPrincipalLookupService();
      fail();
    } catch (ClosedFileSystemException expected) {
    }

    try {
      fs.newWatchService();
      fail();
    } catch (ClosedFileSystemException expected) {
    }

    try {
      fs.supportedFileAttributeViews();
      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