@Test
    public void testSerializeDeserialize_EmptyMessage() throws Exception
    {
        EmptyMessage source = new EmptyMessage();
        LinkedBuffer buffer = LinkedBuffer.allocate();
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        ProtostuffIOUtil.writeTo(outputStream, source, EMPTY_MESSAGE_SCHEMA, buffer);
        byte[] bytes = outputStream.toByteArray();
        EmptyMessage newMessage = EMPTY_MESSAGE_SCHEMA.newMessage();
        ProtostuffIOUtil.mergeFrom(bytes, newMessage, EMPTY_MESSAGE_SCHEMA);
        Assert.assertEquals(0, bytes.length);
    }
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