public static Object replace(Object root, DataIterator it, Object value)
  {
    return transform(root, it, Transforms.constantValue(value));
  }
@Test
  public void testReplaceByNameNested() throws Exception
  {
    SimpleTestData data = IteratorTestData.createSimpleTestData();

    Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)
    .filterBy(Predicates.nameEquals("foo"))
    .replace(new DataList());

    assertEquals(Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)
      .filterBy(Predicates.pathMatchesPathSpec(new PathSpec("nested", "nested", "foo", PathSpec.WILDCARD)))
      .count(), 0);

    assertEquals(Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)
      .filterBy(Predicates.pathMatchesPathSpec(new PathSpec("foo", PathSpec.WILDCARD)))
      .count(), 0);
  }