### Question:
BasicPbCodec { public static byte[] encodeInt(int data){ BaseProto.BaseInt.Builder builder = BaseProto.BaseInt.newBuilder(); builder.setIntData(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 encodeInt() throws InvalidProtocolBufferException { byte[] result = BasicPbCodec.encodeInt(intData); int intResult = BasicPbCodec.decodeInt(result); Assert.assertEquals(intData,intResult); }