private DataConfig getCOSDataConfig(int taskId, String pattern, String contentStyle, boolean retry,
            String startTime, String endTime, TaskStateEnum state, String cycleUnit, String timeZone,
            List<String> filterStreams) {
        DataConfig dataConfig = new DataConfig();
        dataConfig.setInlongGroupId("testGroupId");
        dataConfig.setInlongStreamId("testStreamId");
        dataConfig.setDataReportType(1);
        dataConfig.setTaskType(TaskTypeEnum.COS.getType());
        dataConfig.setTaskId(taskId);
        dataConfig.setTimeZone(timeZone);
        dataConfig.setState(state.ordinal());
        COSTaskConfig cosTaskConfig = new COSTaskConfig();
        cosTaskConfig.setBucketName("testBucket");
        cosTaskConfig.setCredentialsId("testSecretId");
        cosTaskConfig.setCredentialsKey("testSecretKey");
        cosTaskConfig.setRegion("testRegion");
        cosTaskConfig.setPattern(pattern);
        cosTaskConfig.setTimeOffset("0d");
        // GMT-8:00 same with Asia/Shanghai
        cosTaskConfig.setMaxFileCount(100);
        cosTaskConfig.setCycleUnit(cycleUnit);
        cosTaskConfig.setRetry(retry);
        cosTaskConfig.setDataTimeFrom(startTime);
        cosTaskConfig.setDataTimeTo(endTime);
        // mix: login|87601|968|67826|23579 or login|a=b&c=d&x=y&asdf
        cosTaskConfig.setContentStyle(contentStyle);
        cosTaskConfig.setDataSeparator("|");
        cosTaskConfig.setFilterStreams(filterStreams);
        dataConfig.setExtParams(GSON.toJson(cosTaskConfig));
        return dataConfig;
    }
common environment setting up for test cases.
inlong-agent/agent-plugins/src/test/java/org/apache/inlong/agent/plugin/AgentBaseTestsHelper.java