### Question:
AsyncTask { @JsonIgnore public String getUri() { return link.getPoll(); } @JsonCreator private  AsyncTask(@JsonProperty("link") Link link);  AsyncTask(final String uri); @JsonIgnore String getUri();  }### Answer:
@Test public void testDeserialization() throws Exception { final AsyncTask asyncTask = readObjectFromResource("/gdc/asyncTask.json", AsyncTask.class); assertThat(asyncTask.getUri(), is("POLL-URI")); }
@Test public void testSerialization() throws Exception { final String json = OBJECT_MAPPER.writeValueAsString(new AsyncTask("foo")); final AsyncTask asyncTask = OBJECT_MAPPER.readValue(json, AsyncTask.class); assertThat(asyncTask.getUri(), is("foo")); }