static void encodeCatalogResize(
        final UnsafeBuffer encodingBuffer,
        final int offset,
        final int captureLength,
        final int length,
        final long catalogLength,
        final long newCatalogLength)
    {
        int encodedLength = encodeLogHeader(encodingBuffer, offset, captureLength, length);

        encodingBuffer.putLong(offset + encodedLength, catalogLength, LITTLE_ENDIAN);
        encodedLength += SIZE_OF_LONG;

        encodingBuffer.putLong(offset + encodedLength, newCatalogLength, LITTLE_ENDIAN);
    }
@Test
    void testEncodeCatalogResize()
    {
        final int offset = 24;
        final int length = SIZE_OF_LONG * 2 + SIZE_OF_INT * 2;
        final int captureLength = captureLength(length);
        final long catalogLength = 128;
        final long newCatalogLength = 1024;

        encodeCatalogResize(buffer, offset, captureLength, length, catalogLength, newCatalogLength);

        assertEquals(captureLength, buffer.getInt(offset, LITTLE_ENDIAN));
        assertEquals(length, buffer.getInt(offset + SIZE_OF_INT, LITTLE_ENDIAN));
        assertNotEquals(0, buffer.getLong(offset + SIZE_OF_INT * 2, LITTLE_ENDIAN));
        assertEquals(catalogLength, buffer.getLong(offset + LOG_HEADER_LENGTH));
        assertEquals(newCatalogLength, buffer.getLong(offset + LOG_HEADER_LENGTH + SIZE_OF_LONG));
    }