private static String getId(TestCaseEvent testCaseEvent) {
        return testCaseEvent.getTestCase().getId().toString();
    }
@Test
    void shouldWriteItemsAndGroupsCorrectlyToReportJs() throws Throwable {
        runFormatterWithPlugin();

        assertTrue(Files.exists(reportJsFile));

        Long groupId = Thread.currentThread().getId();
        String groupName = Thread.currentThread().toString();

        TestData[] expectedTests = getExpectedTestData(groupId);

        GroupData[] expectedGroups = objectMapper.readValue(
            ("[\n" +
                    " {\n" +
                    " \"id\": groupId,\n" +
                    " \"content\": \"groupName\"\n" +
                    " }\n" +
                    "]")
                    .replaceAll("groupId", groupId.toString())
                    .replaceAll("groupName", groupName),
            GroupData[].class);

        ActualReportOutput actualOutput = readReport();

        // Sort the tests, output order is not a problem but obviously asserting
        // it is
        actualOutput.tests.sort(TEST_DATA_COMPARATOR);

        assertAll(
            () -> assertTimelineTestDataIsAsExpected(expectedTests, actualOutput.tests,
                true, true),
            () -> assertTimelineGroupDataIsAsExpected(expectedGroups,
                actualOutput.groups));
    }