@Test
  public void testNodeChildrenUpdatedSinceUntil() throws ClientServicesException, XMLException {
    long start = System.currentTimeMillis();
    activity = createActivity("ActivityDescendantsUpdatedSinceUntil-" + start);

    List<ActivityNode> nodes = createActivityDescendants(activity);

    ActivityNode sinceNode = nodes.get(1);
    ActivityNode untilNode = nodes.get(3);

    Map<String, String> params = new HashMap<String, String>();
    params.put("since", "" + sinceNode.getUpdated().getTime());
    params.put("until", "" + untilNode.getUpdated().getTime());
    EntityList<ActivityNode> activityNodes =
        activityService.getActivityNodeChildren(activity.getActivityUuid(), params);
    System.out.println(
        "Nodes "
            + activityNodes.size()
            + " updated since: "
            + dateFormat.format(sinceNode.getUpdated())
            + " until: "
            + dateFormat.format(untilNode.getUpdated()));
    dumpNodes(activityNodes);

    Assert.assertEquals(2, activityNodes.size());
  }
  @Test
  public void testNodeChildrenCreatedUntil() throws ClientServicesException, XMLException {
    long start = System.currentTimeMillis();
    activity = createActivity("ActivityDescendantsCreatedUntil-" + start);

    List<ActivityNode> nodes = createActivityDescendants(activity);

    ActivityNode node = nodes.get(2);

    Map<String, String> params = new HashMap<String, String>();
    params.put("until", "" + node.getPublished().getTime());
    params.put("rangeId", "created");
    EntityList<ActivityNode> activityNodes =
        activityService.getActivityNodeChildren(activity.getActivityUuid(), params);
    System.out.println(
        "Nodes "
            + activityNodes.size()
            + " created until: "
            + dateFormat.format(node.getPublished()));
    dumpNodes(activityNodes);

    Assert.assertEquals(2, activityNodes.size());
  }