### Question:
X509Cert implements Serializable { public List<String> getCertificatePolicies() throws IOException { byte[] extensionValue = originalCert.getExtensionValue("2.5.29.32"); List<String> policies = new ArrayList<>(); byte[] octets = ((DEROctetString) DEROctetString.fromByteArray(extensionValue)).getOctets(); ASN1Sequence sequence = (ASN1Sequence) ASN1Sequence.fromByteArray(octets); Enumeration sequenceObjects = sequence.getObjects(); while (sequenceObjects.hasMoreElements()) { DLSequence next = (DLSequence) sequenceObjects.nextElement(); Object objectAt = next.getObjectAt(0); if (objectAt != null) { policies.add(objectAt.toString()); } } return policies; } X509Cert(X509Certificate cert);   X509Cert(String path); List<String> getCertificatePolicies(); X509Certificate getX509Certificate(); String issuerName(Issuer part); String issuerName(); boolean isValid(Date date); boolean isValid(); List<KeyUsage> getKeyUsages(); String getSerial(); String getSubjectName(SubjectName part); String getSubjectName();  }### Answer:
@Test public void testGetPolicies() throws IOException { Assert.assertEquals(1, this.certificate.getCertificatePolicies().size()); }