### Question:
TaurusTask implements Task { @Override public void execute(Context ctx) throws Exception { Taurus.Result result = delegate(ctx).execute(TaskParams.of(new ContextVariables(ctx), defaults)); ctx.setVariable("result", om.convertValue(result, Map.class)); }  @Override void execute(Context ctx);  }### Answer:
@Test public void test() throws Exception { Path workDir = Files.createTempDirectory("test"); Path scenarioFile = Paths.get(TaurusTaskTest.class.getResource("test.yml").toURI()); Files.copy(scenarioFile, workDir.resolve("test.yml")); Map<String, Object> args = new HashMap<>(); args.put("useFakeHome", false); args.put("action", "run"); args.put(com.walmartlabs.concord.sdk.Constants.Context.WORK_DIR_KEY, workDir.toString()); args.put("configs", Arrays.asList( "test.yml", Collections.singletonMap("scenarios", Collections.singletonMap("quick-test", Collections.singletonMap("variables", Collections.singletonMap("endpoint", "/api/v1/server/ping")))) )); Context ctx = mock(Context.class); when(ctx.getVariable(anyString())).then(i -> args.get(i.getArgument(0))); when(ctx.interpolate(any())).then(i -> i.getArgument(0)); TaurusTask t = new TaurusTask(); t.execute(ctx); }