### Question:
DataSourceParam implements ProcessAddTaskParam, InitializingBean { @Override public JsonNode addImportSpecialParam(JsonNode taskNode) { ObjectNode sqlParameters = (ObjectNode) taskNode.path(PARAMS); List<DataSource> dataSources = dataSourceMapper.queryDataSourceByName(sqlParameters.path("datasourceName").asText()); if (!dataSources.isEmpty()) { DataSource dataSource = dataSources.get(0); sqlParameters.put("datasource", dataSource.getId()); } ((ObjectNode)taskNode).set(PARAMS, sqlParameters); return taskNode; }  @Override JsonNode addExportSpecialParam(JsonNode taskNode); @Override JsonNode addImportSpecialParam(JsonNode taskNode); @Override void afterPropertiesSet();  }### Answer:
@Test public void testAddImportDependentSpecialParam() throws JSONException { String sqlJson = "{\"workerGroupId\":-1,\"description\":\"\",\"runFlag\":\"NORMAL\"," + "\"type\":\"SQL\",\"params\":{\"postStatements\":[]," + "\"connParams\":\"\",\"receiversCc\":\"\",\"udfs\":\"\"," + "\"type\":\"MYSQL\",\"title\":\"\",\"sql\":\"show tables\",\"" + "preStatements\":[],\"sqlType\":\"1\",\"receivers\":\"\",\"datasource\":1," + "\"showType\":\"TABLE\",\"localParams\":[],\"datasourceName\":\"dsmetadata\"},\"timeout\"" + ":{\"enable\":false,\"strategy\":\"\"},\"maxRetryTimes\":\"0\"," + "\"taskInstancePriority\":\"MEDIUM\",\"name\":\"mysql\",\"dependence\":{}," + "\"retryInterval\":\"1\",\"preTasks\":[\"dependent\"],\"id\":\"tasks-8745\"}"; ObjectNode taskNode = JSONUtils.parseObject(sqlJson); if (StringUtils.isNotEmpty(taskNode.path("type").asText())) { String taskType = taskNode.path("type").asText(); ProcessAddTaskParam addTaskParam = TaskNodeParamFactory.getByTaskType(taskType); JsonNode sql = addTaskParam.addImportSpecialParam(taskNode); JSONAssert.assertEquals(taskNode.toString(), sql.toString(), false); } }