예제 #1
0
 @Test
 public void testJsonSerializationObjectVersionOld() throws Exception {
   VersionedObject obj = new VersionedObject();
   obj.setDepricatedInt32Field(241901);
   assertEquals(
       obj,
       versioningRoundTripSerailization(obj, Serializer.VERSION_VERSIONING_TEST_V1_0, "json"));
 }
예제 #2
0
  @Test
  public void testBinarySerializationObjectVersionUseRemovedValue() throws Exception {
    VersionedObject obj = new VersionedObject();
    obj.setDepricatedInt32Field(1);

    assertEquals(
        null,
        versioningRoundTripSerailization(obj, Serializer.VERSION_VERSIONING_TEST_V2_0, "binary")
            .getDepricatedInt32Field());
  }