}
private <T> T testRoundTripSerialize(ThriftCodec<T> readCodec, ThriftCodec<T> writeCodec, Type structType, T structInstance)
throws Exception
{
ThriftCatalog readCatalog = readCodecManager.getCatalog();
ThriftStructMetadata readMetadata = readCatalog.getThriftStructMetadata(structType);
assertNotNull(readMetadata);
ThriftCatalog writeCatalog = writeCodecManager.getCatalog();
ThriftStructMetadata writeMetadata = writeCatalog.getThriftStructMetadata(structType);
assertNotNull(writeMetadata);
TMemoryBuffer transport = new TMemoryBuffer(10 * 1024);
TCompactProtocol protocol = new TCompactProtocol(transport);
writeCodec.write(structInstance, protocol);