@Test
  public void maintainOperationsTest() {
    assertNonQueryTestFail(
        "show queries",
        "803: No permissions for this operation, please add privilege MAINTAIN",
        "test",
        "test123");
    assertNonQueryTestFail(
        "kill query 'test'",
        "803: No permissions for this operation, please add privilege MAINTAIN",
        "test",
        "test123");
    assertNonQueryTestFail(
        "show cluster",
        "803: No permissions for this operation, please add privilege MAINTAIN",
        "test",
        "test123");
    assertNonQueryTestFail(
        "show cluster details",
        "803: No permissions for this operation, please add privilege MAINTAIN",
        "test",
        "test123");

    grantUserSystemPrivileges("test", PrivilegeType.MAINTAIN);

    executeNonQuery("show queries", "test", "test123");
    assertNonQueryTestFail(
        "kill query 'test'",
        "701: Please ensure your input <queryId> is correct",
        "test",
        "test123");
    executeNonQuery("show cluster", "test", "test123");
    executeNonQuery("show cluster details", "test", "test123");
  }
This Class contains integration tests for SystemPermissions but {@link PrivilegeType#MANAGE_USER}
and {@link PrivilegeType#MANAGE_ROLE}, you can see tests of them in {@link IoTDBAuthIT}.
integration-test/src/test/java/org/apache/iotdb/db/it/auth/IoTDBSystemPermissionIT.java