### Question:
JsonStepsDumper implements StepsDumper { public void dump(TestScenarioSteps testScenarioSteps, String outputFile) throws IOException { Writer writer = new FileWriter(outputFile); Gson gson = new GsonBuilder().create(); gson.toJson(testScenarioSteps, writer); writer.close(); }  void dump(TestScenarioSteps testScenarioSteps, String outputFile);  }### Answer:
@Test public void dumpsSteps() throws IOException { Map<String, String> testStep = new HashMap<>(); TestScenarioSteps testScenarioSteps = new TestScenarioSteps(); String outputFilename = "tmp.json"; testScenarioSteps.add(testStep); StepsDumper stepsDumper = new JsonStepsDumper(); stepsDumper.dump(testScenarioSteps, outputFilename); File outputFile = new File(outputFilename); assertTrue(outputFile.exists()); assertTrue(outputFile.delete()); }