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

    Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)
    .filterBy(Predicates.and(Predicates.pathMatchesPathSpec(IteratorTestData.PATH_TO_ID), IteratorTestData.LESS_THAN_3_CONDITION))
    .replace(50);

    assertEquals(data.getValue().getDataList("foo").getDataMap(0).getInteger("id").intValue(), 50);
    assertEquals(data.getValue().getDataList("foo").getDataMap(1).getInteger("id").intValue(), 50);
  }