@Test
    public void testSerializeDeserialize_MessageWithEmptyMessage_unset() throws Exception
    {
        MessageWithEmptyMessage source = new MessageWithEmptyMessage();
        LinkedBuffer buffer = LinkedBuffer.allocate();
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        ProtostuffIOUtil.writeTo(outputStream, source, MESSAGE_WITH_EMPTY_MESSAGE_SCHEMA, buffer);
        byte[] bytes = outputStream.toByteArray();
        MessageWithEmptyMessage newMessage = MESSAGE_WITH_EMPTY_MESSAGE_SCHEMA.newMessage();
        ProtostuffIOUtil.mergeFrom(bytes, newMessage, MESSAGE_WITH_EMPTY_MESSAGE_SCHEMA);
        Assert.assertEquals(0, bytes.length);
        Assert.assertNull(newMessage.getA());
    }
Test that protostuff compiler generates valid code for messages w/o fields

@author Konstantin Shchepanovskyi
protostuff-it/src/test/java/io/protostuff/compiler/java_bean/EmptyMessageIT.java