}
public static void testNakedBinary(byte[] data) throws Exception {
TMemoryBuffer buf = new TMemoryBuffer(0);
TProtocol proto = factory.getProtocol(buf);
proto.writeBinary(data);
// System.out.println(buf.inspect());
byte[] out = proto.readBinary();
if (!Arrays.equals(data, out)) {
throw new RuntimeException("Binary was supposed to be '" + data + "' but was '" + out + "'");
}