@Test
public void testOr() throws RecognitionException {

  CommonTree sink = FlumeBuilder
      .parseSink(" { batch(10) => logicalNode(\"collector\")  } ");
  // PatternMatch pdeco = var("deco", kind("DECO"));
  PatternMatch pdeco = tuple(kind("DECO"), var("deco", kind("SINK")), kind(
      "DECO").child(var("child", kind("SINK"))));
  /*
   * .child( tuple(var("deco", kind("SINK")), var("child", wild())));
   */
  PatternMatch psink = tuple(kind("SINK"), var("name", wild()), var("sink",
      kind("STRING")));
  PatternMatch pp = or(psink, pdeco);
  LOG.info(sink.toStringTree());
  Map<String, CommonTree> m = pp.match(sink);
  assertNotNull(m);
  assertTrue(m.containsKey("deco"));
  dumpMatches(m);
  LOG.info(m);
  m = pp.match(m.get("child"));
  assertNotNull(m);
  assertTrue(m.containsKey("sink"));
  dumpMatches(m);
  LOG.info(m);
}