@Test
  public void testOpenWatchServicesClosed() throws IOException {
    WatchService ws1 = fs.newWatchService();
    WatchService ws2 = fs.newWatchService();

    assertNull(ws1.poll());
    assertNull(ws2.poll());

    fs.close();

    try {
      ws1.poll();
      fail();
    } catch (ClosedWatchServiceException expected) {
    }

    try {
      ws2.poll();
      fail();
    } catch (ClosedWatchServiceException expected) {
    }
  }
Tests for what happens when a file system is closed.

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