@Test public void testConverMarshallableToTextName() { TestMarshallable testMarshallable = new TestMarshallable(); testMarshallable.setName("hello world"); Bytes<ByteBuffer> byteBufferBytes = Bytes.elasticByteBuffer(); ByteBuffer byteBuffer = byteBufferBytes.underlyingObject(); System.out.println(byteBuffer.getClass()); Wire textWire = new TextWire(byteBufferBytes); textWire.bytes().readPosition(); textWire.writeDocument(false, d -> d.write(() -> "any-key").marshallable(testMarshallable)); String value = Wires.fromSizePrefixedBlobs(textWire.bytes()); // String replace = value.replace("\n", "\\n"); System.out.println(byteBufferBytes.toHexString()); System.out.println(value); // Assert.assertTrue(replace.length() > 1); }