### Question:
DataxTask extends AbstractTask { private String buildDataxJsonFile(Map<String, Property> paramsMap) throws Exception { String fileName = String.format("%s/%s_job.json", taskExecutionContext.getExecutePath(), taskExecutionContext.getTaskAppId()); String json; Path path = new File(fileName).toPath(); if (Files.exists(path)) { return fileName; } if (dataXParameters.getCustomConfig() == Flag.YES.ordinal()){ json = dataXParameters.getJson().replaceAll("\\r\\n", "\n"); }else { ObjectNode job = JSONUtils.createObjectNode(); job.putArray("content").addAll(buildDataxJobContentJson()); job.set("setting", buildDataxJobSettingJson()); ObjectNode root = JSONUtils.createObjectNode(); root.set("job", job); root.set("core", buildDataxCoreJson()); json = root.toString(); } json = ParameterUtils.convertParameterPlaceholders(json, ParamUtils.convert(paramsMap)); logger.debug("datax job json : {}", json); FileUtils.writeStringToFile(new File(fileName), json, StandardCharsets.UTF_8); return fileName; } DataxTask(TaskExecutionContext taskExecutionContext, Logger logger); @Override void init(); @Override void handle(); @Override void cancelApplication(boolean cancelApplication); String[] tryExecuteSqlResolveColumnNames(BaseDataSource baseDataSource, String sql); @Override AbstractParameters getParameters();  }### Answer:
@Test public void testBuildDataxJsonFile() throws Exception { try { setTaskParems(1); Method method = DataxTask.class.getDeclaredMethod("buildDataxJsonFile"); method.setAccessible(true); String filePath = (String) method.invoke(dataxTask, null); Assert.assertNotNull(filePath); } catch (Exception e) { Assert.fail(e.getMessage()); } }