static int dissectLogHeader(
        final String context,
        final Enum<?> code,
        final MutableDirectBuffer buffer,
        final int offset,
        final StringBuilder builder)
    {
        int encodedLength = 0;

        final int captureLength = buffer.getInt(offset + encodedLength, LITTLE_ENDIAN);
        encodedLength += SIZE_OF_INT;

        final int bufferLength = buffer.getInt(offset + encodedLength, LITTLE_ENDIAN);
        encodedLength += SIZE_OF_INT;

        final long timestampNs = buffer.getLong(offset + encodedLength, LITTLE_ENDIAN);
        encodedLength += SIZE_OF_LONG;

        LogUtil.appendTimestamp(builder, timestampNs);
        builder.append(context)
            .append(": ")
            .append(code.name())
            .append(" [")
            .append(captureLength)
            .append('/')
            .append(bufferLength)
            .append(']');

        return encodedLength;
    }
@Test
    void dissectLogHeader()
    {
        internalEncodeLogHeader(buffer, 0, 100, 222, () -> 1234567890);

        final int decodedLength = CommonEventDissector
            .dissectLogHeader("test ctx", ArchiveEventCode.CMD_OUT_RESPONSE, buffer, 0, builder);

        assertEquals(LOG_HEADER_LENGTH, decodedLength);
        assertEquals("[1.234567890] test ctx: CMD_OUT_RESPONSE [100/222]", builder.toString());
    }