### Question:
BasicPbCodec { public static byte[] encodeLong(long data){ BaseProto.BaseLong.Builder builder = BaseProto.BaseLong.newBuilder(); builder.setLongData(data); return builder.build().toByteArray(); }  static byte[] encodeBytesList(byte[]... elements); static byte[] encodeBytesList(List<ByteArrayWrapper> bytesList); static List<ByteArrayWrapper> decodeBytesList(byte[] protoBuf); static byte[] encodeInt(int data); static int decodeInt(byte[] protoBuf); static byte[] encodeLong(long data); static long decodeLong(byte[] protoBuf); static byte[] encodeString(String data); static String decodeString(byte[] protoBuf);  }### Answer:
@Test public void encodeLong() throws InvalidProtocolBufferException { byte[] result = BasicPbCodec.encodeLong(longData); long longResult = BasicPbCodec.decodeLong(result); Assert.assertEquals(longData,longResult); }