public static int listRecordings(final File archiveDir, final RecordingDescriptorConsumer consumer)
    {
        try (Catalog catalog = new Catalog(archiveDir, System::currentTimeMillis))
        {
            return catalog.forEach(new RecordingDescriptorConsumerAdapter(consumer));
        }
    }
@Test
    void shouldListAllRecordingsInCatalog()
    {
        final int count = CatalogView.listRecordings(archiveDir, mockRecordingDescriptorConsumer);
        assertEquals(3, count);

        verify(mockRecordingDescriptorConsumer).onRecordingDescriptor(
            Aeron.NULL_VALUE, Aeron.NULL_VALUE, recordingOneId, 4L, Aeron.NULL_VALUE, 10L,
            Aeron.NULL_VALUE, 0, SEGMENT_LENGTH, TERM_LENGTH, MTU_LENGTH, 7, 1,
            "channelG", "channelG?tag=f", "sourceA");

        verify(mockRecordingDescriptorConsumer).onRecordingDescriptor(
            Aeron.NULL_VALUE, Aeron.NULL_VALUE, recordingTwoId, 5L, Aeron.NULL_VALUE, 11L,
            Aeron.NULL_VALUE, 0, SEGMENT_LENGTH, TERM_LENGTH, MTU_LENGTH, 8, 2,
            "channelH", "channelH?tag=f", "sourceV");

        verify(mockRecordingDescriptorConsumer).onRecordingDescriptor(
            Aeron.NULL_VALUE, Aeron.NULL_VALUE, recordingThreeId, 6L, Aeron.NULL_VALUE, 12L,
            Aeron.NULL_VALUE, 0, SEGMENT_LENGTH, TERM_LENGTH, MTU_LENGTH, 9, 3,
            "channelK", "channelK?tag=f", "sourceB");

        verifyNoMoreInteractions(mockRecordingDescriptorConsumer);
    }