void finishReport() {
        List<StepDefContainer> stepDefContainers = new ArrayList<>();
        for (Map.Entry<String, List<StepContainer>> usageEntry : usageMap.entrySet()) {
            StepDefContainer stepDefContainer = new StepDefContainer(
                usageEntry.getKey(),
                createStepContainers(usageEntry.getValue()));
            stepDefContainers.add(stepDefContainer);
        }

        try {
            Jackson.OBJECT_MAPPER.writeValue(out, stepDefContainers);
            out.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
@Test
    @Disabled("TODO")
    void doneWithoutUsageStatisticStrategies() throws JSONException {
        OutputStream out = new ByteArrayOutputStream();
        UsageFormatter usageFormatter = new UsageFormatter(out);
        UsageFormatter.StepContainer stepContainer = new UsageFormatter.StepContainer("a step");
        UsageFormatter.StepDuration stepDuration = new UsageFormatter.StepDuration(Duration.ofNanos(1234567800L),
            "location.feature");
        stepContainer.getDurations().addAll(singletonList(stepDuration));
        usageFormatter.usageMap.put("a (.*)", singletonList(stepContainer));

        usageFormatter.finishReport();

        String json = "" +
                "[\n" +
                "  {\n" +
                "    \"source\": \"a (.*)\",\n" +
                "    \"steps\": [\n" +
                "      {\n" +
                "        \"name\": \"a step\",\n" +
                "        \"aggregatedDurations\": {\n" +
                "          \"median\": 1.2345678,\n" +
                "          \"average\": 1.2345678\n" +
                "        },\n" +
                "        \"durations\": [\n" +
                "          {\n" +
                "            \"duration\": 1.2345678,\n" +
                "            \"location\": \"location.feature\"\n" +
                "          }\n" +
                "        ]\n" +
                "      }\n" +
                "    ]\n" +
                "  }\n" +
                "]";

        assertEquals(json, out.toString(), true);
    }