   dubbo-rpc/dubbo-rpc-rmi
   dubbo-rpc/dubbo-rpc-thrift
   dubbo-rpc/dubbo-rpc-webservice/
import org.apache.dubbo.rpc.RpcResult;
import org.apache.dubbo.rpc.gen.thrift.Demo;
import org.apache.dubbo.rpc.protocol.thrift.io.RandomAccessByteArrayOutputStream;
import org.apache.thrift.TApplicationException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TMessage;
import org.apache.thrift.protocol.TMessageType;
import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TIOStreamTransport;
import org.apache.thrift.transport.TTransport;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import java.io.ByteArrayInputStream;
@Ignore
public class ThriftCodecTest {
    private ThriftCodec codec = new ThriftCodec();
    private Channel channel = new MockedChannel(URL.valueOf("thrift://127.0.0.1"));
    static byte[] encodeFrame(byte[] content) {
        byte[] result = new byte[4 + content.length];
        TFramedTransport.encodeFrameSize(content.length, result);
        System.arraycopy(content, 0, result, 4, content.length);
        return result;
    }
    @Test
    public void testEncodeRequest() throws Exception {
        Request request = createRequest();
        ChannelBuffer output = ChannelBuffers.dynamicBuffer(1024);
        codec.encode(channel, output, request);
        byte[] bytes = new byte[output.readableBytes()];