TlsPolicyDescriptor { public void setPolicyType(String name) { this.policyType = name; }  @Regex("(?:[a-zA-Z0-9_-]+)") String getPolicyType(); void setPolicyType(String name); @Regex("(?:[a-zA-Z0-9,!_+-]+)") String getCiphers(); void setCiphers(String ciphers); @Regex("(?:[a-zA-Z0-9,.!_+-]+)") String getProtocols(); void setProtocols(String protocols); TlsProtection getProtection(); void setProtection(TlsProtection protection); @Unchecked Collection<String> getData(); void setData(Collection<String> data); @Unchecked Map<String, String> getMeta(); void setMeta(Map<String, String> meta);  }
@Test public void testInsecureTlsPolicyDescriptor() throws JsonProcessingException, IOException { TlsPolicyDescriptor descriptor = new TlsPolicyDescriptor(); descriptor.setPolicyType("INSECURE"); log.debug("insecure descriptor json: {}", json.writeValueAsString(descriptor)); log.debug("insecure descriptor xml: {}", xml.writeValueAsString(descriptor)); TlsPolicyDescriptor copy = json.readValue(json.writeValueAsString(descriptor), TlsPolicyDescriptor.class); log.debug("copy public-key-digest: {}", json.writeValueAsString(copy)); }