}
@Test
public void getPattern() {
// relative path
pattern = new AuthActionPattern("test");
assertMatches(false, "a.b.test");
assertMatches(false, "a.test.");
assertMatches(false, "a.test.b");
assertMatches(true, "test");
assertMatches(true, "test.");
assertMatches(true, "test.b");
assertMatches(false, "atest");
assertMatches(false, "testb");
assertMatches(false, "atestb");
// abs path
pattern = new AuthActionPattern("t.est");
assertMatches(false, "a.b.t.est");
assertMatches(false, "a.t.est.");
assertMatches(false, "a.t.est.b");
assertMatches(true, "t.est");
assertMatches(true, "t.est.");
assertMatches(true, "t.est.b");
assertMatches(false, "at.est");
assertMatches(false, "t.estb");
assertMatches(false, "at.estb");
// root path
pattern = new AuthActionPattern(".");
assertMatches(true, null);
assertMatches(true, " ");
assertMatches(true, " .");
}