public static void writeString(final @NotNull ByteBuf buf, final @NotNull CharSequence string) {
        writeString(buf, string, Short.MAX_VALUE);
    }
@Test
    void testWriteStringTooLong() {
        assertThrows(EncoderException.class, () -> BufUtil.writeString(this.buf, "aa", 1));
    }