private DataConfig getSQLDataConfig(int taskId, String sql, String contentStyle, boolean retry,
            String startTime, String endTime, TaskStateEnum state, String cycleUnit, String timeZone) {
        DataConfig dataConfig = new DataConfig();
        dataConfig.setInlongGroupId("testGroupId");
        dataConfig.setInlongStreamId("testStreamId");
        dataConfig.setDataReportType(1);
        dataConfig.setTaskType(TaskTypeEnum.SQL.getType());
        dataConfig.setTaskId(taskId);
        dataConfig.setTimeZone(timeZone);
        dataConfig.setState(state.ordinal());
        SQLTaskConfig sqlTaskConfig = new SQLTaskConfig();
        sqlTaskConfig.setUsername("testUserName");
        sqlTaskConfig.setJdbcPassword("testPassword");
        sqlTaskConfig.setSql(sql);
        sqlTaskConfig.setTimeOffset("0d");
        // GMT-8:00 same with Asia/Shanghai
        sqlTaskConfig.setMaxInstanceCount(100);
        sqlTaskConfig.setCycleUnit(cycleUnit);
        sqlTaskConfig.setRetry(retry);
        sqlTaskConfig.setDataTimeFrom(startTime);
        sqlTaskConfig.setDataTimeTo(endTime);
        dataConfig.setExtParams(GSON.toJson(sqlTaskConfig));
        return dataConfig;
    }
common environment setting up for test cases.
inlong-agent/agent-plugins/src/test/java/org/apache/inlong/agent/plugin/AgentBaseTestsHelper.java