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

        final boolean isReResolution = 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(" isReResolution=").append(isReResolution);

        builder.append(" address=");
        dissectInetAddress(buffer, absoluteOffset, builder);
    }
@Test
    void dissectResolve() throws UnknownHostException
    {
        final String resolver = "testResolver";
        final long durationNs = 32167;
        final String hostname = "localhost";
        final boolean isReResolution = false;
        final InetAddress address = InetAddress.getByName("127.0.0.1");

        final int length = SIZE_OF_BOOLEAN + SIZE_OF_LONG + trailingStringLength(resolver, MAX_HOST_NAME_LENGTH) +
            trailingStringLength(hostname, MAX_HOST_NAME_LENGTH) +
            inetAddressLength(address);

        DriverEventEncoder.encodeResolve(
            buffer, 0, length, length, resolver, durationNs, hostname, isReResolution, address);
        final StringBuilder builder = new StringBuilder();
        DriverEventDissector.dissectResolve(buffer, 0, builder);

        assertThat(builder.toString(), endsWith(
            "DRIVER: NAME_RESOLUTION_RESOLVE [46/46]: " +
            "resolver=testResolver durationNs=32167 name=localhost isReResolution=false address=127.0.0.1"));
    }