void recordingStopped(final long recordingId, final long position, final long timestampMs)
    {
        final int recordingDescriptorOffset = recordingDescriptorOffset(recordingId);
        final int offset = recordingDescriptorOffset + DESCRIPTOR_HEADER_LENGTH;
        final long stopPosition = nativeOrder() == BYTE_ORDER ? position : Long.reverseBytes(position);

        fieldAccessBuffer.putLong(offset + stopTimestampEncodingOffset(), timestampMs, BYTE_ORDER);
        fieldAccessBuffer.putLongVolatile(offset + stopPositionEncodingOffset(), stopPosition);
        updateChecksum(recordingDescriptorOffset);
        forceWrites(catalogChannel);
    }
@Test
    void recordingStoppedShouldUpdateChecksum()
    {
        final Checksum checksum = crc32();
        try (Catalog catalog = new Catalog(archiveDir, null, 0, CAPACITY, clock, checksum, segmentFileBuffer))
        {
            assertChecksum(catalog, recordingOneId, 160, 0, null);

            catalog.recordingStopped(recordingOneId, 140, 231723682323L);

            assertChecksum(catalog, recordingOneId, 160, 1656993099, checksum);
        }
    }