@Test void testGetMustacheKeysWithSingleMatchSurroundedByText() { assertThat(MustacheResolver.getMustacheKeys("aa{{test}}bb")).containsExactly("test"); }
public static List<String> getMustacheKeys(final String template) { final Set<String> keys = new HashSet<>(); if (StringUtils.isNotEmpty(template)) { final Matcher matcher = MUSTACHE_PATTERN.matcher(template); while(matcher.find()) { keys.add(matcher.group(1)); } } return new ArrayList<>(keys); }
MustacheResolver { public static List<String> getMustacheKeys(final String template) { final Set<String> keys = new HashSet<>(); if (StringUtils.isNotEmpty(template)) { final Matcher matcher = MUSTACHE_PATTERN.matcher(template); while(matcher.find()) { keys.add(matcher.group(1)); } } return new ArrayList<>(keys); } }
MustacheResolver { public static List<String> getMustacheKeys(final String template) { final Set<String> keys = new HashSet<>(); if (StringUtils.isNotEmpty(template)) { final Matcher matcher = MUSTACHE_PATTERN.matcher(template); while(matcher.find()) { keys.add(matcher.group(1)); } } return new ArrayList<>(keys); }  }
MustacheResolver { public static List<String> getMustacheKeys(final String template) { final Set<String> keys = new HashSet<>(); if (StringUtils.isNotEmpty(template)) { final Matcher matcher = MUSTACHE_PATTERN.matcher(template); while(matcher.find()) { keys.add(matcher.group(1)); } } return new ArrayList<>(keys); }  static List<String> getMustacheKeys(final String template); static List<String> getMustacheKeysForTreeNode(final String template); }
MustacheResolver { public static List<String> getMustacheKeys(final String template) { final Set<String> keys = new HashSet<>(); if (StringUtils.isNotEmpty(template)) { final Matcher matcher = MUSTACHE_PATTERN.matcher(template); while(matcher.find()) { keys.add(matcher.group(1)); } } return new ArrayList<>(keys); }  static List<String> getMustacheKeys(final String template); static List<String> getMustacheKeysForTreeNode(final String template); static final Pattern MUSTACHE_PATTERN; }