@Override
  public UnderFileSystem create(String path, UnderFileSystemConfiguration conf) {
    Preconditions.checkNotNull(path, "Unable to create UnderFileSystem instance:"
        + " URI path should not be null");
    if (conf.getInt(PropertyKey.UNDERFS_GCS_VERSION) == GCS_VERSION_TWO) {
      try {
        return GCSV2UnderFileSystem.createInstance(new AlluxioURI(path), conf);
      } catch (IOException e) {
        LOG.error("Failed to create GCSV2UnderFileSystem.", e);
        throw Throwables.propagate(e);
      }
    }
    else {
      if (checkGCSCredentials(conf)) {
        try {
          return GCSUnderFileSystem.createInstance(new AlluxioURI(path), conf);
        } catch (ServiceException e) {
          LOG.error("Failed to create GCSUnderFileSystem.", e);
          throw Throwables.propagate(e);
        }
      }
    }
    String err = "GCS credentials or version not available, cannot create GCS Under File System.";
    throw new InvalidArgumentRuntimeException(err);
  }
@Test
  public void createInstanceWithPath() {
    UnderFileSystem ufs = mFactory.create(mPath, mConf);
    Assert.assertNotNull(ufs);
    Assert.assertTrue(ufs instanceof GCSUnderFileSystem);
  }