@Test
  public void authUtilsTest_PatternPathCheck() throws AuthException, IllegalPathException {
    AuthUtils.validatePatternPath(new PartialPath(new String("root.data.t1")));
    AuthUtils.validatePatternPath(new PartialPath(new String("root.data.**")));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.*a"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.*"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.t1.a*.a"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.t1.*.a"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.t1.**.a"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.t1.a*.*"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.t1.*.*"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.t1.**.*"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.t1.a*.**"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.t1.*.**"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("root.data.t1.**.**"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("*.data.t1.**.**"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("**.data.t1.**.**"))));
    Assert.assertThrows(
        AuthException.class,
        () -> AuthUtils.validatePatternPath(new PartialPath(new String("*a.data.t1.**.**"))));
  }
root.t1 : read data; root.t2 : write schema ; root.** : read data
iotdb-core/node-commons/src/test/java/org/apache/iotdb/commons/utils/AuthUtilsTest.java