assertFalse(pattern.matcher("som").matches());
assertFalse(pattern.matcher("awesome").matches());
assertEquals("^\\Qsome\\E.*\\Q\\E$", pattern.pattern());
pkr = new PublicKeyRecordImpl(
"k=rsa; g=*+test; h=sha1:sha256; p=XXXXXXXX=;");
pkr.validate();
pattern = pkr.getGranularityPattern();
assertEquals("^\\Q\\E.*\\Q+test\\E$", pattern.pattern());
assertTrue(pattern.matcher("a+test").matches());
assertTrue(pattern.matcher("+test").matches());
assertFalse(pattern.matcher("atest").matches());