UpdateSnapshotHistoryBridgeResult extends BaseDTO { public String serialize() { JaxbJsonSerializer<UpdateSnapshotHistoryBridgeResult> serializer = new JaxbJsonSerializer<>(UpdateSnapshotHistoryBridgeResult.class); try { return serializer.serialize(this); } catch (IOException e) { throw new SnapshotDataException("Unable to create task result due to: " + e.getMessage()); } } UpdateSnapshotHistoryBridgeResult();  UpdateSnapshotHistoryBridgeResult(SnapshotSummary snapshot,
                                             String history); SnapshotSummary getSnapshot(); void setSnapshot(SnapshotSummary snapshot); String getHistory(); void setHistory(String history); String serialize(); static UpdateSnapshotHistoryBridgeResult deserialize(String bridgeResult);  }
@Test public void testSerialize() { UpdateSnapshotHistoryBridgeResult bridgeResult = new UpdateSnapshotHistoryBridgeResult(snapshot, history); String result = bridgeResult.serialize(); String cleanResult = result.replaceAll("\\s+", ""); assertThat(cleanResult, containsString("\"history\":\"" + history + "\"")); verifySummary(result, "id-1", SnapshotStatus.SNAPSHOT_COMPLETE.name(), "desc-1"); }