@Test
public void testCollectionTemplate() throws Exception {

    CollectionHolder root = new CollectionHolder(Collections.emptyList());
    Optional<Object> sanitizedOpt = new TemplateSanitizer(
            path -> path.equals("values") ? Optional.of(asList("a", "b")) : Optional.empty(),
            type -> true
    ).apply(root);
    assertThat(sanitizedOpt).isPresent();
}