public FileSystem get(Key key) {
    synchronized (mLock) {
      Value value = mCacheMap.get(key);
      FileSystem fs;
      if (value == null) {
        // On cache miss, create and insert a new FileSystem instance,
        fs = FileSystem.Factory.create(FileSystemContext.create(key.mSubject, key.mConf));
        mCacheMap.put(key, new Value(fs, 1));
      } else {
        fs = value.mFileSystem;
        value.mRefCount.getAndIncrement();
      }
      return new InstanceCachingFileSystem(fs, key);
    }
  }
@Test
  public void listStatusClosed() throws IOException, AlluxioException {
    Exception e = assertThrows(IOException.class, () -> {
      Key key1 = createTestFSKey("user1");
      FileSystem fs1 = mFileSystemCache.get(key1);
      fs1.close();
      assertTrue(fs1.isClosed());
      fs1.listStatus(new AlluxioURI("/"));
    });
    assertTrue(e.getMessage()
        .contains(FileSystemCache.InstanceCachingFileSystem.CLOSED_FS_ERROR_MESSAGE));
  }