### Question:
MethodsMapper extends FunctionMapper { static Map<String, Method> filterByName(final Map<String, Method> given, final Pattern pattern) { final Map<String, Method> methods = new HashMap<>(); for (final Method method : given.values()) { if (pattern.matcher(method.getName()).matches()) { methods.put(method.getName(), method); } } return methods; } @VisibleForTesting  MethodsMapper(final Map<String, Method> methods); @Override Method resolveFunction(String prefix, String localName); static final MethodsMapper INSTANCE; }### Answer:
@Test public void shouldFilterMethods() { assertThat(filterByName(methods, Pattern.compile(".*asU.*"))).hasSize(1); assertThat(filterByName(methods, Pattern.compile(".*as.*"))).hasSize(3); }