PdpPolicy { public Date getCreated() { return created; } PdpPolicy();  PdpPolicy(String policyXml, String name, boolean latestRevision, String userIdentifier, String authenticatingAuthority, String userDisplayName, boolean active, String type); Long getId(); void setId(Long id); String getPolicyId(); void setPolicyId(String policyId); String getPolicyXml(); void setPolicyXml(String policyXml); String getName(); void setName(String name); String getAuthenticatingAuthority(); void setAuthenticatingAuthority(String authenticatingAuthority); String getUserIdentifier(); void setUserIdentifier(String userIdentifier); String getUserDisplayName(); void setUserDisplayName(String userDisplayName); Set<PdpPolicy> getRevisions(); void setRevisions(Set<PdpPolicy> revisions); void addRevision(PdpPolicy revision); Set<PdpPolicyViolation> getViolations(); void setViolations(Set<PdpPolicyViolation> violations); void addPdpPolicyViolation(PdpPolicyViolation violation); Date getCreated(); void setCreated(Date created); int getRevisionNbr(); void setRevisionNbr(int revisionNbr); boolean isLatestRevision(); void setLatestRevision(boolean latestRevision); boolean isActive(); void setActive(boolean active); PdpPolicy getParentPolicy(); void setParentPolicy(PdpPolicy parentPolicy); String getType(); void setType(String type); static PdpPolicy revision(String newName, PdpPolicy parent, String newPolicyXml, String userIdentifier, String userDisplayName, boolean isActive);  }
@Test public void testCreateReadonly() throws Exception { String json = IOUtils.toString(new ClassPathResource("policies/update_policy.json").getInputStream(), "UTF-8"); PdpPolicyDefinition definition = objectMapper.readValue(json, PdpPolicyDefinition.class); assertNull(definition.getCreated()); }