}
@Test
public void testReplaceBySchemaNameNested() throws Exception
{
SimpleTestData data = IteratorTestData.createSimpleTestData();
Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)
.filterBy(Predicates.dataSchemaNameEquals("Bar"))
.replace(500);
List<Object> accumulate = new ArrayList<Object>(Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)
.filterBy(Predicates.pathMatchesPathSpec(new PathSpec("nested", "nested", "foo", PathSpec.WILDCARD)))
.accumulateValues());
assertEquals(accumulate.size(), 2);
assertEquals(accumulate.get(0), 500);
assertEquals(accumulate.get(1), 500);
accumulate = new ArrayList<Object>(Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)
.filterBy(Predicates.pathMatchesPathSpec(new PathSpec("foo", PathSpec.WILDCARD)))
.accumulateValues());
assertEquals(accumulate.size(), 3);
assertEquals(accumulate.get(0), 500);