GetSnapshotHistoryBridgeResult extends BaseDTO { public static GetSnapshotHistoryBridgeResult deserialize(String bridgeResult) { JaxbJsonSerializer<GetSnapshotHistoryBridgeResult> serializer = new JaxbJsonSerializer<>(GetSnapshotHistoryBridgeResult.class); try { return serializer.deserialize(bridgeResult); } catch (IOException e) { throw new SnapshotDataException( "Unable to deserialize result due to: " + e.getMessage()); } }  List<SnapshotHistoryItem> getHistoryItems(); void setHistoryItems(List<SnapshotHistoryItem> historyItems); Long getTotalCount(); void setTotalCount(Long totalCount); String serialize(); static GetSnapshotHistoryBridgeResult deserialize(String bridgeResult);  }
@Test public void testDeSerialize() { String str = "{ \"totalCount\" : " + totalCount + ", \"historyItems\" : " + "[ { \"history\" : \"" + history + "\"," + " \"historyDate\" : " + historyDate.getTime() + " } ] }"; System.out.println(str); GetSnapshotHistoryBridgeResult result = GetSnapshotHistoryBridgeResult.deserialize(str); List<SnapshotHistoryItem> historyItems = result.getHistoryItems(); Assert.assertNotNull(historyItems); Assert.assertEquals(1, historyItems.size()); Assert.assertEquals(totalCount, result.getTotalCount()); Assert.assertEquals(history, historyItems.get(0).getHistory()); Assert.assertEquals(historyDate, historyItems.get(0).getHistoryDate()); }