Directives (String expectedText, @NotNull Directives directives) { Matcher directiveMatcher = DIRECTIVE_PATTERN.matcher(expectedText); while (directiveMatcher.find()) { String name = directiveMatcher.group(1); String value = directiveMatcher.group(3); directives.put(name, value); } return directives; }