DdiPolling { public String getSleep() { return sleep; } DdiPolling(final String sleep);  DdiPolling(); String getSleep();  }
@Test @Description("Verify the correct serialization and deserialization of the model") public void shouldSerializeAndDeserializeObject() throws IOException { DdiPolling ddiPolling = new DdiPolling("10"); String serializedDdiPolling = mapper.writeValueAsString(ddiPolling); DdiPolling deserializedDdiPolling = mapper.readValue(serializedDdiPolling, DdiPolling.class); assertThat(serializedDdiPolling).contains(ddiPolling.getSleep()); assertThat(deserializedDdiPolling.getSleep()).isEqualTo(ddiPolling.getSleep()); }
@Test @Description("Verify the correct deserialization of a model with a additional unknown property") public void shouldDeserializeObjectWithUnknownProperty() throws IOException { String serializedDdiPolling = "{\"sleep\":\"10\",\"unknownProperty\":\"test\"}"; DdiPolling ddiPolling = mapper.readValue(serializedDdiPolling, DdiPolling.class); assertThat(ddiPolling.getSleep()).isEqualTo("10"); }