public static void testNakedByte() throws Exception {
TMemoryBuffer buf = new TMemoryBuffer(0);
TProtocol proto = factory.getProtocol(buf);
proto.writeByte((byte)123);
byte out = proto.readByte();
if (out != 123) {
throw new RuntimeException("Byte was supposed to be " + (byte)123 + " but was " + out);
}
}