@Test
public void testValidateInvalidInstanceId() throws IOException {

    Path path = Paths.get("src/test/resources/valid_email.csr");
    String csr = new String(Files.readAllBytes(path));
    X509ServiceCertRequest certReq = new X509ServiceCertRequest(csr);
    assertNotNull(certReq);
    StringBuilder errorMsg = new StringBuilder(256);
    List<String> providerDnsSuffixList = Collections.singletonList("ostk.athenz.cloud");
    DataCache athenzSysDomainCache = Mockito.mock(DataCache.class);
    Mockito.when(athenzSysDomainCache.getProviderDnsSuffixList("provider")).thenReturn(providerDnsSuffixList);
    assertFalse(certReq.validate("athenz", "production", "provider",
            null, athenzSysDomainCache, null, null, null, null, errorMsg));
}