@Test
  public void manageTriggerTest() {
    assertNonQueryTestFail(
        String.format(
            "create stateless trigger testTrigger before insert on root.test.stateless.* as '%s' using URI '%s'",
            TRIGGER_FILE_TIMES_COUNTER, TRIGGER_JAR_PREFIX + "TriggerFireTimesCounter.jar"),
        "803: No permissions for this operation, please add privilege USE_TRIGGER",
        "test",
        "test123");
    assertNonQueryTestFail(
        "drop trigger testTrigger",
        "803: No permissions for this operation, please add privilege USE_TRIGGER",
        "test",
        "test123");
    assertTestFail(
        "show triggers",
        "803: No permissions for this operation, please add privilege USE_TRIGGER",
        "test",
        "test123");

    grantUserSystemPrivileges("test", PrivilegeType.USE_TRIGGER);

    executeNonQuery(
        String.format(
            "create stateless trigger testTrigger before insert on root.test.stateless.* as '%s' using URI '%s'",
            TRIGGER_FILE_TIMES_COUNTER, TRIGGER_JAR_PREFIX + "TriggerFireTimesCounter.jar"),
        "test",
        "test123");
    executeNonQuery("drop trigger testTrigger", "test", "test123");
    executeQuery("show triggers", "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