@Test
public void testFlowInfoPropagation() {

  final Props jobProps = new Props();
  jobProps.put(TonyJobArg.HDFS_CLASSPATH.azPropName, "hdfs://nn:8020");
  jobProps.put(CommonJobProperties.PROJECT_NAME, "unit_test");
  jobProps.put(CommonJobProperties.FLOW_ID, "1");
  jobProps.put(CommonJobProperties.EXEC_ID, "0");
  final TonyJob tonyJob = new TonyJob("test_tony_job", new Props(), jobProps, log) {
    @Override
    public String getWorkingDirectory() {
      return System.getProperty("java.io.tmpdir");
    }
  };
  Configuration conf = tonyJob.getTonyJobConf();
  Set<String> values = new HashSet<>(
      conf.getStringCollection(TonyJob.TONY_APPLICATION_TAGS));
  values.remove("");
  Map<String, String> parsedTags = new HashMap<>();
  for (String value : values) {
    String[] pair = value.split(":");
    Assert.assertTrue(pair.length == 2);
    parsedTags.put(pair[0], pair[1]);
  }
  Assert.assertEquals(parsedTags.get(CommonJobProperties.EXEC_ID), "0");
  Assert.assertEquals(parsedTags.get(CommonJobProperties.FLOW_ID), "1");
  Assert.assertEquals(parsedTags.get(CommonJobProperties.PROJECT_NAME), "unit_test");
}