@Test
    public void testLongTaggedString() {
        char[] chars = new char[1024];
        Arrays.fill(chars, 'a');
        String longString = new String(chars);
        SimpleExampleMessageData message = new SimpleExampleMessageData()
                .setMyString(longString);
        ObjectSerializationCache cache = new ObjectSerializationCache();
        short version = 1;
        int size = message.size(cache, version);
        ByteBuffer buf = ByteBuffer.allocate(size);
        ByteBufferAccessor byteBufferAccessor = new ByteBufferAccessor(buf);
        message.write(byteBufferAccessor, cache, version);
        assertEquals(size, buf.position());
    }
Verify that the JSON files support the same message versions as the
schemas accessible through the ApiKey class.
clients/src/test/java/org/apache/kafka/common/message/MessageTest.java