### Question:
GitTaskV2 implements Task { @Override public TaskResult execute(Variables input) throws Exception { Map<String, Object> result = delegate.execute(input.toMap()); return new TaskResult(MapUtils.getBoolean(result, "ok", true), MapUtils.getString(result, "error")) .values(result); } @Inject  GitTaskV2(SecretService secretService, WorkingDirectory workDir); @Override TaskResult execute(Variables input);  }### Answer:
@Test public void test() throws Exception { Map<String, Object> input = new HashMap<>(); input.put(GitTask.ACTION_KEY, GitTask.Action.CLONE.name()); input.put(GitTask.GIT_URL, "https: GitTaskV2 task = new GitTaskV2(mock(SecretService.class), new WorkingDirectory(workDir)); TaskResult result = task.execute(new MapBackedVariables(input)); assertTrue(result.ok()); }