GetSnapshotContentBridgeResult extends BaseDTO { public static GetSnapshotContentBridgeResult deserialize(String bridgeResult) { JaxbJsonSerializer<GetSnapshotContentBridgeResult> serializer = new JaxbJsonSerializer<>(GetSnapshotContentBridgeResult.class); try { return serializer.deserialize(bridgeResult); } catch (IOException e) { throw new SnapshotDataException( "Unable to deserialize result due to: " + e.getMessage()); } }  List<SnapshotContentItem> getContentItems(); void setContentItems(List<SnapshotContentItem> contentItems); Long getTotalCount(); void setTotalCount(Long totalCount); String serialize(); static GetSnapshotContentBridgeResult deserialize(String bridgeResult);  }
@Test public void testDeSerialize() { String str = "{ \"totalCount\" : " + totalCount + ", \"contentItems\" : " + "[ { \"contentId\" : \"" + contentId + "\"," + " \"contentProperties\" : " + "{\"" + propName + "\" : \"" + propValue + "\"}}]}"; System.out.println(str); GetSnapshotContentBridgeResult result = GetSnapshotContentBridgeResult.deserialize(str); List<SnapshotContentItem> contentItems = result.getContentItems(); Assert.assertNotNull(contentItems); Assert.assertEquals(1, contentItems.size()); Assert.assertEquals(totalCount, result.getTotalCount()); Assert.assertEquals(contentId, contentItems.get(0).getContentId()); Assert.assertEquals(propValue, contentItems.get(0).getContentProperties() .get(propName)); }