CreateRestoreBridgeParameters extends BaseDTO { public String serialize() { JaxbJsonSerializer<CreateRestoreBridgeParameters> serializer = new JaxbJsonSerializer<>(CreateRestoreBridgeParameters.class); try { return serializer.serialize(this); } catch (IOException e) { throw new SnapshotDataException( "Unable to create result due to: " + e.getMessage()); } } CreateRestoreBridgeParameters();  CreateRestoreBridgeParameters(String host,
                                         String port,
                                         String storeId,
                                         String spaceId,
                                         String snapshotId,
                                         String userEmail); String getHost(); void setHost(String host); String getPort(); void setPort(String port); String getStoreId(); void setStoreId(String storeId); String getSpaceId(); void setSpaceId(String spaceId); String getSnapshotId(); void setSnapshotId(String snapshotId); String getUserEmail(); void setUserEmail(String userEmail); String serialize();  }
@Test public void testSerialize() { CreateRestoreBridgeParameters params = new CreateRestoreBridgeParameters(host, port, storeId, spaceId, snapshotId, userEmail); String result = params.serialize(); String cleanResult = result.replaceAll("\\s+", ""); assertThat(cleanResult, containsString("\"host\":\"" + host + "\"")); assertThat(cleanResult, containsString("\"port\":\"" + port + "\"")); assertThat(cleanResult, containsString("\"storeId\":\"" + storeId + "\"")); assertThat(cleanResult, containsString("\"spaceId\":\"" + spaceId + "\"")); assertThat(cleanResult, containsString("\"snapshotId\":\"" + snapshotId + "\"")); assertThat(cleanResult, containsString("\"userEmail\":\"" + userEmail + "\"")); }