@Test
public void testGetMaxConcurentRunsPerFlowMap() {

  Props props = new Props();
  // empty map is returned if whitelist is not set
  assertThat(ExecutorUtils.getMaxConcurentRunsPerFlowMap(props).size()).isEqualTo(0);
  props.put(ConfigurationKeys.CONCURRENT_RUNS_ONEFLOW_WHITELIST,
      "project1,flow1,300;project2,flow2,5");
  Map<Pair<String, String>, Integer> map =  ExecutorUtils.getMaxConcurentRunsPerFlowMap(props);
  assertThat(map.size()).isEqualTo(2);
  assertThat(map.get(new Pair("project1", "flow1"))).isEqualTo(300);
  assertThat(map.get(new Pair("project2", "flow2"))).isEqualTo(5);
  // negative test: missing flow
  props.put(ConfigurationKeys.CONCURRENT_RUNS_ONEFLOW_WHITELIST,
      "project1,flow1,300;project2,5");
  assertThatThrownBy(() -> ExecutorUtils.getMaxConcurentRunsPerFlowMap(props)).isInstanceOf
      (IllegalStateException.class);
}