@Test
public void testExtractX509CSRSubjectField() throws IOException {

    Path path = Paths.get("src/test/resources/valid.csr");
    String csr = new String(Files.readAllBytes(path));
    PKCS10CertificationRequest certReq1 = Crypto.getPKCS10CertRequest(csr);
    PKCS10CertificationRequest certReq = Mockito.spy(certReq1);
    assertNotNull(certReq);
    assertEquals(Crypto.extractX509CSRCommonName(certReq), "athenz.syncer");
    assertEquals(Crypto.extractX509CSRSubjectOField(certReq), "My Test Company");
    assertNull(Crypto.extractX509CSRSubjectOUField(certReq));
    assertNull(Crypto.extractX509CSREmail(certReq));
}