@Test
public void testParseFlowId() throws Exception {

  // flowId pattern: flowRootName[,embeddedFlowName:embeddedFlowPath]*
  Assert.assertEquals("Unexpected immediate flow id",
      "root", parseImmediateFlowId("root"));
  Assert.assertEquals("Unexpected immediate flow id",
      "root:emb_1", parseImmediateFlowId("root,emb_1:root:emb_1"));
  Assert.assertEquals("Unexpected immediate flow id",
      "root:emb_1:emb_2:emb_3",
      parseImmediateFlowId(
          "root,emb_1:root:emb_1,emb_2:root:emb_1:emb_2,emb_3:root:emb_1:emb_2:emb_3"));
}