Added tests for text serialization protocol