  @Test
  public void testProcessMultipleTemplateValue() {

    List<String> strings = new ArrayList<>();
    strings.add("This is all $foobar[0].");
    strings.add("I like $foobar[1].");
    expect(docMock.removeAll("templ")).andReturn(strings);
    Map<String, Collection<String>> map = new HashMap<>();
    map.put("foobar", Arrays.asList("good", "pie"));
    expect(docMock.getId()).andReturn("bar").anyTimes();
    expect(docMock.asMap()).andReturn(map);
    expect(docMock.put("templ", "This is all good.")).andReturn(true);
    expect(docMock.put("templ", "I like pie.")).andReturn(true);
    replay();
    FieldTemplateProcessor proc = new FieldTemplateProcessor.Builder().named("foo").withTemplatesIn("templ").build();
    proc.processDocument(docMock);
  }