@Test
public void testGetMaxConcurrentRunsForFlow() {

  Props props = new Props();
  props.put(Constants.ConfigurationKeys.MAX_CONCURRENT_RUNS_ONEFLOW, 10);
  props.put(ConfigurationKeys.CONCURRENT_RUNS_ONEFLOW_WHITELIST,
      "project1,flow1,300;project2,flow2,5");
  Map<Pair<String, String>, Integer> map =  ExecutorUtils.getMaxConcurentRunsPerFlowMap(props);
  int defaultMaxConcurrent = ExecutorUtils.getMaxConcurrentRunsOneFlow(props);
  assertThat(ExecutorUtils.getMaxConcurrentRunsForFlow("project1", "flow1",
      defaultMaxConcurrent, map)).isEqualTo(300);
  assertThat(ExecutorUtils.getMaxConcurrentRunsForFlow("project2", "flow2",
      defaultMaxConcurrent, map)).isEqualTo(5);
  assertThat(ExecutorUtils.getMaxConcurrentRunsForFlow("project3", "flow3",
      defaultMaxConcurrent, map)).isEqualTo(10);
  // return default value if there are no if the whitelisted flow map is empty
  assertThat(ExecutorUtils.getMaxConcurrentRunsForFlow("project1", "flow1",
      defaultMaxConcurrent, Collections.EMPTY_MAP)).isEqualTo(10);
}