private static void testStructField(StructFieldTestCase testCase) throws Exception {
TMemoryBuffer buf = new TMemoryBuffer(0);
TProtocol proto = factory.getProtocol(buf);
TField field = new TField("test_field", testCase.type_, testCase.id_);
proto.writeStructBegin(new TStruct("test_struct"));
proto.writeFieldBegin(field);
testCase.writeMethod(proto);
proto.writeFieldEnd();
proto.writeStructEnd();