@Test
  public void testListThings() {
    // 1. list user
    AuthorStatement stmt = createAuthDclStmt("LIST USER;");
    assertEquals(StatementType.LIST_USER, stmt.getType());
    assertEquals(null, stmt.getRoleName());

    // 2. list user of role
    stmt = createAuthDclStmt("LIST USER OF ROLE `role1`;");
    assertEquals(StatementType.LIST_USER, stmt.getType());
    assertEquals("role1", stmt.getRoleName());

    // 3. list role
    stmt = createAuthDclStmt("LIST ROLE;");
    assertEquals(StatementType.LIST_ROLE, stmt.getType());
    assertEquals(null, stmt.getUserName());

    // 4. list role of user
    stmt = createAuthDclStmt("LIST ROLE OF USER `user1`;");
    assertEquals(StatementType.LIST_ROLE, stmt.getType());
    assertEquals("user1", stmt.getUserName());

    // 5. list privileges of user
    stmt = createAuthDclStmt("LIST PRIVILEGES OF USER `user1`;");
    assertEquals(StatementType.LIST_USER_PRIVILEGE, stmt.getType());
    assertEquals("user1", stmt.getUserName());

    // 6. list privileges of role
    stmt = createAuthDclStmt("LIST PRIVILEGES OF ROLE `role1`;");
    assertEquals(StatementType.LIST_ROLE_PRIVILEGE, stmt.getType());
    assertEquals("role1", stmt.getRoleName());
  }
This test will check grant/revoke simple privilege on/from paths.
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGeneratorTest.java