public static boolean extractMinionAllowDownloadFromServer(TableConfig tableConfig, String taskType,
      boolean defaultValue) {
    TableTaskConfig tableTaskConfig = tableConfig.getTaskConfig();
    if (tableTaskConfig != null) {
      Map<String, String> configs = tableTaskConfig.getConfigsForTaskType(taskType);
      if (configs != null && !configs.isEmpty()) {
        return Boolean.parseBoolean(
            configs.getOrDefault(TableTaskConfig.MINION_ALLOW_DOWNLOAD_FROM_SERVER, String.valueOf(defaultValue)));
      }
    }
    return defaultValue;
  }
@Test
  public void testExtractMinionAllowDownloadFromServer() {
    Map<String, String> configs = new HashMap<>();
    TableTaskConfig tableTaskConfig = new TableTaskConfig(
        Collections.singletonMap(MinionConstants.MergeRollupTask.TASK_TYPE, configs));
    TableConfig tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName("sampleTable")
        .setTaskConfig(tableTaskConfig).build();

    // Test when the configuration is not set, should return the default value which is false
    assertFalse(MinionTaskUtils.extractMinionAllowDownloadFromServer(tableConfig,
        MinionConstants.MergeRollupTask.TASK_TYPE, false));

    // Test when the configuration is set to true
    configs.put(TableTaskConfig.MINION_ALLOW_DOWNLOAD_FROM_SERVER, "true");
    tableTaskConfig = new TableTaskConfig(Collections.singletonMap(MinionConstants.MergeRollupTask.TASK_TYPE, configs));
    tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName("sampleTable")
        .setTaskConfig(tableTaskConfig).build();
    assertTrue(MinionTaskUtils.extractMinionAllowDownloadFromServer(tableConfig,
        MinionConstants.MergeRollupTask.TASK_TYPE, false));

    // Test when the configuration is set to false
    configs.put(TableTaskConfig.MINION_ALLOW_DOWNLOAD_FROM_SERVER, "false");
    tableTaskConfig = new TableTaskConfig(Collections.singletonMap(MinionConstants.MergeRollupTask.TASK_TYPE, configs));
    tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName("sampleTable")
        .setTaskConfig(tableTaskConfig).build();
    assertFalse(MinionTaskUtils.extractMinionAllowDownloadFromServer(tableConfig,
        MinionConstants.MergeRollupTask.TASK_TYPE, false));
  }