### Question:
CertificateAuthorityCredential extends Certificate { public byte[] getSubjectKeyIdentifier() { if (null != subjectKeyIdentifier) { return subjectKeyIdentifier.clone(); } return null; } CertificateAuthorityCredential(final byte[] certificateBytes);  CertificateAuthorityCredential(final Path certificatePath); protected  CertificateAuthorityCredential(); static Selector select(final CertificateManager certMan); String getCredentialType(); byte[] getSubjectKeyIdentifier(); @Override @SuppressWarnings("checkstyle:avoidinlineconditionals") boolean equals(final Object o); @Override @SuppressWarnings({"checkstyle:magicnumber", "checkstyle:avoidinlineconditionals"}) int hashCode(); static final String SUBJECT_KEY_IDENTIFIER_FIELD; }### Answer:
@Test public void testGetSubjectKeyIdentifier() throws CertificateException, IOException, URISyntaxException { Path testCertPath = Paths.get( this.getClass().getResource(CertificateTest.FAKE_ROOT_CA_FILE).toURI() ); CertificateAuthorityCredential caCred = new CertificateAuthorityCredential(testCertPath); byte[] subjectKeyIdentifier = caCred.getSubjectKeyIdentifier(); Assert.assertNotNull(subjectKeyIdentifier); Assert.assertEquals( Hex.encodeHexString(subjectKeyIdentifier), CertificateTest.FAKE_ROOT_CA_SUBJECT_KEY_IDENTIFIER_HEX ); }