@Test
public void testValidateCertRequestHostnames() {

    HashMap<String, String> attributes = new HashMap<>();
    attributes.put("sanDNS", "api.athenz.athenz.cloud,i-1234.instanceid.athenz.athenz.cloud");
    StringBuilder id = new StringBuilder(256);
    assertTrue(InstanceUtils.validateCertRequestSanDnsNames(attributes, "athenz", "api", "athenz.cloud", id));
    assertEquals(id.toString(), "i-1234");
}