static void dissectReplaySessionError(
        final MutableDirectBuffer buffer, final int offset, final StringBuilder builder)
    {
        int absoluteOffset = offset;
        absoluteOffset += dissectLogHeader(CONTEXT, REPLAY_SESSION_ERROR, buffer, absoluteOffset, builder);

        final long sessionId = buffer.getLong(absoluteOffset, LITTLE_ENDIAN);
        absoluteOffset += SIZE_OF_LONG;

        final long recordingId = buffer.getLong(absoluteOffset, LITTLE_ENDIAN);
        absoluteOffset += SIZE_OF_LONG;

        builder.append(": sessionId=").append(sessionId);
        builder.append(" recordingId=").append(recordingId);
        builder.append(" errorMessage=");
        buffer.getStringAscii(absoluteOffset, builder);
    }
@Test
    void replaySessionError()
    {
        internalEncodeLogHeader(buffer, 0, 6, 100, () -> 5_600_000_000L);
        buffer.putLong(LOG_HEADER_LENGTH, -8, LITTLE_ENDIAN);
        buffer.putLong(LOG_HEADER_LENGTH + SIZE_OF_LONG, 42, LITTLE_ENDIAN);
        buffer.putStringAscii(LOG_HEADER_LENGTH + SIZE_OF_LONG * 2, "something went wrong");

        dissectReplaySessionError(buffer, 0, builder);

        assertEquals("[5.600000000] " + CONTEXT + ": " + REPLAY_SESSION_ERROR.name() + " [6/100]:" +
            " sessionId=-8 recordingId=42 errorMessage=something went wrong",
            builder.toString());
    }