예제 #1
0
  @Test
  public void testJsonSerializationObjectVersionNew() throws Exception {
    VersionedObject obj = new VersionedObject();
    obj.setNewInt64Field(242341223412L);

    assertEquals(
        obj,
        versioningRoundTripSerailization(obj, Serializer.VERSION_VERSIONING_TEST_V2_0, "json"));
  }
예제 #2
0
  @Test
  public void testJsonSerializationObjectVersionUseNewValueInOldVersion() throws Exception {
    VersionedObject obj = new VersionedObject();
    obj.setNewInt64Field(1L);

    assertEquals(
        null,
        versioningRoundTripSerailization(obj, Serializer.VERSION_VERSIONING_TEST_V1_0, "json")
            .getNewInt64Field());
  }