GetSnapshotListBridgeResult extends BaseDTO { public String serialize() { JaxbJsonSerializer<GetSnapshotListBridgeResult> serializer = new JaxbJsonSerializer<>(GetSnapshotListBridgeResult.class); try { return serializer.serialize(this); } catch (IOException e) { throw new SnapshotDataException("Unable to create task 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 testSerialize() { SnapshotSummary summary1 = new SnapshotSummary("id-1", SnapshotStatus.SNAPSHOT_COMPLETE, "desc-1", storeId, spaceId); List<SnapshotSummary> summaries = new ArrayList<>(); summaries.add(summary1); String result = new GetSnapshotListBridgeResult(summaries).serialize(); verifySummary(result, "id-1", SnapshotStatus.SNAPSHOT_COMPLETE.name(), "desc-1", storeId, spaceId); SnapshotSummary summary2 = new SnapshotSummary("id-2", SnapshotStatus.REPLICATING_TO_STORAGE, "desc-2", storeId, spaceId); summaries.add(summary2); result = new GetSnapshotListBridgeResult(summaries).serialize(); verifySummary(result, "id-1", SnapshotStatus.SNAPSHOT_COMPLETE.name(), "desc-1", storeId, spaceId); verifySummary(result, "id-2", SnapshotStatus.SNAPSHOT_COMPLETE.name(), "desc-2", storeId, spaceId); }