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

        final boolean isReLookup = 1 == buffer.getByte(absoluteOffset);
        absoluteOffset += SIZE_OF_BYTE;

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

        builder.append(": resolver=");
        absoluteOffset += buffer.getStringAscii(absoluteOffset, builder);
        absoluteOffset += SIZE_OF_INT;

        builder.append(" durationNs=").append(durationNs);

        builder.append(" name=");
        absoluteOffset += buffer.getStringAscii(absoluteOffset, builder);
        absoluteOffset += SIZE_OF_INT;

        builder.append(" isReLookup=").append(isReLookup);

        builder.append(" resolvedName=");
        buffer.getStringAscii(absoluteOffset, builder);
    }
@Test
    void dissectLookup()
    {
        final int offset = 48;
        final String resolver = "xyz";
        final long durationNs = 32167;
        final String name = "localhost:7777";
        final boolean isReLookup = false;
        final String resolvedName = "test:1234";

        final int length = SIZE_OF_BOOLEAN + SIZE_OF_LONG +
            trailingStringLength(resolver, MAX_HOST_NAME_LENGTH) +
            trailingStringLength(name, MAX_HOST_NAME_LENGTH) +
            trailingStringLength(resolvedName, MAX_HOST_NAME_LENGTH);

        DriverEventEncoder.encodeLookup(
            buffer, offset, length, length, resolver, durationNs, name, isReLookup, resolvedName);
        final StringBuilder builder = new StringBuilder();
        DriverEventDissector.dissectLookup(buffer, offset, builder);

        assertThat(builder.toString(), endsWith(
            "DRIVER: NAME_RESOLUTION_LOOKUP [47/47]: " +
            "resolver=xyz durationNs=32167 name=localhost:7777 isReLookup=false resolvedName=test:1234"));
    }