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