@Test
public void testCapturingGroups() {

    parameters.add(ff2.literal("abc123_678"));
    parameters.add(ff2.literal(".*(\\d{3})_(\\d{3})"));
    parameters.add(ff2.literal("first${1}_second${2}_full${0}"));
    Function fn = finder.findFunction("stringTemplate", parameters, fallback);
    Object result = fn.evaluate(null);
    assertEquals("first123_second678_fullabc123_678", result);
}