RestartSnapshotBridgeResult extends BaseDTO { public String serialize() { JaxbJsonSerializer<RestartSnapshotBridgeResult> serializer = new JaxbJsonSerializer<>(RestartSnapshotBridgeResult.class); try { return serializer.serialize(this); } catch (IOException e) { throw new SnapshotDataException("Unable to create task result due to: " + e.getMessage()); } } RestartSnapshotBridgeResult();  RestartSnapshotBridgeResult(String description, SnapshotStatus status); String getDescription(); void setDescription(String description); SnapshotStatus getStatus(); void setStatus(SnapshotStatus status); String serialize(); static RestartSnapshotBridgeResult deserialize(String bridgeResult);  }
@Test public void testSerialize() { String description = "description"; SnapshotStatus status = SnapshotStatus.INITIALIZED; RestartSnapshotBridgeResult params = new RestartSnapshotBridgeResult(description, status); String result = params.serialize(); String cleanResult = result.replaceAll("\\s+", ""); assertThat(cleanResult, containsString("\"description\":\"" + description + "\"")); assertThat(cleanResult, containsString("\"status\":\"" + status.name() + "\"")); }