@Test
public void testValidateOUFieldCheckMissingOU() throws IOException {

    // no ou field available
    Path path = Paths.get("src/test/resources/athenz.single_ip.csr");
    String csr = new String(Files.readAllBytes(path));
    X509CertRequest certReq = new X509CertRequest(csr);
    assertNotNull(certReq);
    HashSet<String> validOrgUnits = new HashSet<>();
    validOrgUnits.add("Athenz");
    assertTrue(certReq.validateSubjectOUField(null, null, null));
    assertTrue(certReq.validateSubjectOUField("Testing Domains", null, null));
    assertTrue(certReq.validateSubjectOUField(null, "Testing Domains", null));
    assertTrue(certReq.validateSubjectOUField("Bad1", "Bad2", null));
    assertTrue(certReq.validateSubjectOUField(null, null, validOrgUnits));
    assertTrue(certReq.validateSubjectOUField("Testing Domains", "None Test", validOrgUnits));
}