DdiDeploymentBase extends ResourceSupport { public DdiDeployment getDeployment() { return deployment; } DdiDeploymentBase();  DdiDeploymentBase(final String id, final DdiDeployment deployment, final DdiActionHistory actionHistory); DdiDeployment getDeployment(); DdiActionHistory getActionHistory(); @Override String toString();  }
@Test @Description("Verify the correct deserialization of a model with a additional unknown property") public void shouldDeserializeObjectWithUnknownProperty() throws IOException { String serializedDdiDeploymentBase = "{\"id\":\"1234\",\"deployment\":{\"download\":\"forced\"," + "\"update\":\"attempt\",\"maintenanceWindow\":\"available\",\"chunks\":[]}," + "\"actionHistory\":{\"status\":\"TestAction\",\"messages\":[\"Action status message 1\"," + "\"Action status message 2\"]},\"links\":[],\"unknownProperty\":\"test\"}"; DdiDeploymentBase ddiDeploymentBase = mapper.readValue(serializedDdiDeploymentBase, DdiDeploymentBase.class); assertThat(ddiDeploymentBase.getDeployment().getDownload().getName()).isEqualTo(FORCED.getName()); assertThat(ddiDeploymentBase.getDeployment().getUpdate().getName()).isEqualTo(ATTEMPT.getName()); assertThat(ddiDeploymentBase.getDeployment().getMaintenanceWindow().getStatus()).isEqualTo( AVAILABLE.getStatus()); }