### Question:
TaskParametersUtils { public static AbstractParameters getParameters(String taskType, String parameter) { TaskType anEnum = EnumUtils.getEnum(TaskType.class, taskType); if (anEnum == null) { logger.error("not support task type: {}", taskType); return null; } switch (anEnum) { case SUB_PROCESS: return JSONUtils.parseObject(parameter, SubProcessParameters.class); case SHELL: case WATERDROP: return JSONUtils.parseObject(parameter, ShellParameters.class); case PROCEDURE: return JSONUtils.parseObject(parameter, ProcedureParameters.class); case SQL: return JSONUtils.parseObject(parameter, SqlParameters.class); case MR: return JSONUtils.parseObject(parameter, MapreduceParameters.class); case SPARK: return JSONUtils.parseObject(parameter, SparkParameters.class); case PYTHON: return JSONUtils.parseObject(parameter, PythonParameters.class); case DEPENDENT: return JSONUtils.parseObject(parameter, DependentParameters.class); case FLINK: return JSONUtils.parseObject(parameter, FlinkParameters.class); case HTTP: return JSONUtils.parseObject(parameter, HttpParameters.class); case DATAX: return JSONUtils.parseObject(parameter, DataxParameters.class); case CONDITIONS: return JSONUtils.parseObject(parameter, ConditionsParameters.class); case SQOOP: return JSONUtils.parseObject(parameter, SqoopParameters.class); default: return null; } } private  TaskParametersUtils(); static AbstractParameters getParameters(String taskType, String parameter);  }### Answer:
@Test public void testGetParameters() { Assert.assertNull(TaskParametersUtils.getParameters("xx", "ttt")); Assert.assertNull(TaskParametersUtils.getParameters("SHELL", "ttt")); Assert.assertNotNull(TaskParametersUtils.getParameters("SHELL", "{}")); Assert.assertNotNull(TaskParametersUtils.getParameters("SQL", "{}")); Assert.assertNotNull(TaskParametersUtils.getParameters("SUB_PROCESS", "{}")); Assert.assertNotNull(TaskParametersUtils.getParameters("PROCEDURE", "{}")); Assert.assertNotNull(TaskParametersUtils.getParameters("MR", "{}")); Assert.assertNotNull(TaskParametersUtils.getParameters("SPARK", "{}")); Assert.assertNotNull(TaskParametersUtils.getParameters("PYTHON", "{}")); Assert.assertNotNull(TaskParametersUtils.getParameters("DEPENDENT", "{}")); Assert.assertNotNull(TaskParametersUtils.getParameters("FLINK", "{}")); Assert.assertNotNull(TaskParametersUtils.getParameters("HTTP", "{}")); }