@Nullable
  public static MergeType getMergeType(Map<String, String> taskConfig) {
    String mergeType = taskConfig.get(MergeTask.MERGE_TYPE_KEY);
    return mergeType != null ? MergeType.valueOf(mergeType.toUpperCase()) : null;
  }
@Test
  public void testGetMergeType() {
    assertEquals(MergeTaskUtils.getMergeType(Collections.singletonMap(MergeTask.MERGE_TYPE_KEY, "concat")),
        MergeType.CONCAT);
    assertEquals(MergeTaskUtils.getMergeType(Collections.singletonMap(MergeTask.MERGE_TYPE_KEY, "Rollup")),
        MergeType.ROLLUP);
    assertEquals(MergeTaskUtils.getMergeType(Collections.singletonMap(MergeTask.MERGE_TYPE_KEY, "DeDuP")),
        MergeType.DEDUP);
    assertNull(MergeTaskUtils.getMergeType(Collections.emptyMap()));

    try {
      MergeTaskUtils.getMergeType(Collections.singletonMap(MergeTask.MERGE_TYPE_KEY, "unsupported"));
      fail();
    } catch (IllegalArgumentException e) {
      // Expected
    }
  }