Added test for binary encoding in thrift