static int dissectSocketAddress(final MutableDirectBuffer buffer, final int offset, final StringBuilder builder)
    {
        int encodedLength = 0;
        final int port = buffer.getInt(offset + encodedLength, LITTLE_ENDIAN);
        encodedLength += SIZE_OF_INT;

        encodedLength += dissectInetAddress(buffer, offset + encodedLength, builder);

        builder.append(':').append(port);

        return encodedLength;
    }
@Test
    void dissectSocketAddressIpv6()
    {
        final int offset = 16;
        buffer.putInt(offset, 7777, LITTLE_ENDIAN);
        buffer.putInt(offset + SIZE_OF_INT, 16, LITTLE_ENDIAN);
        buffer.putBytes(offset + (SIZE_OF_INT * 2),
            new byte[]{ -100, 124, 0, 18, 120, -128, 44, 44, 10, -80, 80, 22, 122, 5, 5, -99 });

        final int decodedLength = CommonEventDissector.dissectSocketAddress(buffer, offset, builder);

        assertEquals(24, decodedLength);
        assertEquals("[9c7c:12:7880:2c2c:ab0:5016:7a05:59d]:7777", builder.toString());
    }