GetSnapshotListBridgeResult extends BaseDTO { public static GetSnapshotListBridgeResult deserialize(String bridgeResult) { JaxbJsonSerializer<GetSnapshotListBridgeResult> serializer = new JaxbJsonSerializer<>(GetSnapshotListBridgeResult.class); try { return serializer.deserialize(bridgeResult); } catch (IOException e) { throw new SnapshotDataException( "Unable to deserialize result due to: " + e.getMessage()); } } GetSnapshotListBridgeResult();  GetSnapshotListBridgeResult(List<SnapshotSummary> snapshots); List<SnapshotSummary> getSnapshots(); void setSnapshots(List<SnapshotSummary> snapshots); String serialize(); static GetSnapshotListBridgeResult deserialize(String bridgeResult);  }
@Test public void testDeSerialize() { String snapshotId = "snapshotId"; SnapshotStatus status = SnapshotStatus.INITIALIZED; String description = "description"; String str = "{ \"snapshots\" : " + "[ { \"status\" : \"" + status + "\"," + " \"description\" : \"" + description + "\"," + " \"snapshotId\" : \"" + snapshotId + "\"," + " \"sourceSpaceId\" : \"" + spaceId + "\"," + " \"sourceStoreId\" : \"" + storeId + "\"" + "}]}"; GetSnapshotListBridgeResult params = GetSnapshotListBridgeResult.deserialize(str); List<SnapshotSummary> snapshots = params.getSnapshots(); Assert.assertNotNull(snapshots); Assert.assertEquals(1, snapshots.size()); SnapshotSummary snapshot = snapshots.get(0); Assert.assertEquals(snapshotId, snapshot.getSnapshotId()); Assert.assertEquals(status, snapshot.getStatus()); Assert.assertEquals(description, snapshot.getDescription()); Assert.assertEquals(storeId, snapshot.getSourceStoreId()); Assert.assertEquals(spaceId, snapshot.getSourceSpaceId()); }