package voldemort.protocol.pb;

import voldemort.client.protocol.RequestFormatType;
import voldemort.protocol.AbstractRequestFormatTest;

public class ProtocolBuffersRequestFormatTest extends AbstractRequestFormatTest {

    public ProtocolBuffersRequestFormatTest() {
        super(RequestFormatType.PROTOCOL_BUFFERS);
    }

}

@@ -36,51 +36,276 @@
 ort 
-voldemort.client.protocol.RequestFormatType
+java.io.ByteArrayInputStream;%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.DataInputStream;%0Aimport java.io.IOException;%0Aimport java.util.List;%0A%0Aimport voldemort.client.protocol.RequestFormatType;%0Aimport voldemort.client.protocol.pb.ProtoBuffClientRequestFormat
 ;%0Aim
@@ -354,16 +354,55 @@
 matTest;
+%0Aimport voldemort.versioning.Versioned;
 %0A%0Apublic
@@ -526,16 +526,16 @@
 est() %7B%0A
-
         
@@ -584,10 +584,1033 @@
 %0A    %7D%0A%0A
+    /**%0A     * Replicates a test used by the c++ client. It should give us a warning if%0A     * a protocol change for get breaks compatibility.%0A     */%0A    public void testReadGetResponse() throws IOException %7B%0A        ByteArrayOutputStream out = new ByteArrayOutputStream();%0A        short%5B%5D shorts = new short%5B%5D %7B 0x18, 0x0a, 0x16, 0x0a, 0x05, 0x77, 0x6f, 0x72, 0x6c, 0x64,%0A                0x12, 0x0d, 0x0a, 0x04, 0x08, 0x00, 0x10, 0x01, 0x10, 0xf8, 0x9d, 0xe2, 0x88, 0x9b,%0A                0x24 %7D;%0A        byte%5B%5D bytes = new byte%5Bshorts.length%5D;%0A        for(int i = 0; i %3C shorts.length; i++)%0A            bytes%5Bi%5D = (byte) shorts%5Bi%5D;%0A        out.write(bytes);%0A        ProtoBuffClientRequestFormat requestFormat = new ProtoBuffClientRequestFormat();%0A        List%3CVersioned%3Cbyte%5B%5D%3E%3E getResponse = requestFormat.readGetResponse(new DataInputStream(new ByteArrayInputStream(out.toByteArray())));%0A        out.write(bytes);%0A        out.write(%22Some more gibberish%22.getBytes());%0A        assertEquals(1, getResponse.size());%0A    %7D%0A%0A
 %7D%0A

Add testReadGetResponse.