public static String[] getCleanedPathComponents(String path) throws InvalidPathException {
    if (path == null || path.isEmpty()) {
      throw new InvalidPathException(ExceptionMessage.PATH_INVALID.getMessage(path));
    }
    if (AlluxioURI.SEPARATOR.equals(path)) { // root
      return new String[]{""};
    }
    return path.split(AlluxioURI.SEPARATOR);
  }
@Test
  public void getCleanedPathComponents() throws InvalidPathException {
    assertArrayEquals(new String[] {"s3:", "", "a", "b"},
        PathUtils.getCleanedPathComponents("s3://a/b"));
    assertArrayEquals(new String[] {""}, PathUtils.getCleanedPathComponents("/"));
  }