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

    Object result = Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)
        .filterBy(Predicates.dataSchemaNameEquals("Foo"))
        .replace(new DataMap());

    assertTrue(result instanceof DataMap);
    assertEquals(((DataMap)result).size(), 0);
  }