GetSignedUrlTaskResult { public String serialize() { JaxbJsonSerializer<GetSignedUrlTaskResult> serializer = new JaxbJsonSerializer<>(GetSignedUrlTaskResult.class); try { return serializer.serialize(this); } catch (IOException e) { throw new TaskDataException( "Unable to create task result due to: " + e.getMessage()); } } GetSignedUrlTaskResult();  GetSignedUrlTaskResult(String signedUrl); String getSignedUrl(); void setSignedUrl(String signedUrl); String serialize(); static GetSignedUrlTaskResult deserialize(String taskResult);  }
@Test public void testSerialize() { GetSignedUrlTaskResult taskResult = new GetSignedUrlTaskResult(); taskResult.setSignedUrl(signedUrl); String result = taskResult.serialize(); String cleanResult = result.replaceAll("\\s+", ""); assertThat(cleanResult, containsString("\"signedUrl\":\"" + signedUrl + "\"")); }