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

        // Have to ignore actual thread id and just checknot null
        final TestData[] expectedTests = getExpectedTestData(0L);

        final ActualReportOutput actualOutput = readReport();

        // Cannot verify size / contents of Groups as multi threading not
        // guaranteed in Travis CI
        assertThat(actualOutput.groups, not(empty()));
        for (int i = 0; i < actualOutput.groups.size(); i++) {
            final GroupData actual = actualOutput.groups.get(i);

            final int idx = i;
            assertAll(
                () -> assertThat(String.format("id on group %s, was not as expected", idx),
                    actual.getId() > 0,
                    is(equalTo(true))),
                () -> assertThat(String.format("content on group %s, was not as expected",
                    idx), actual.getContent(),
                    is(notNullValue())));
        }

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