@Test
public void extractReqeustInstanceIdFromURI() {

    // first no list
    List<String> uriList = new ArrayList<>();
    assertNull(X509CertUtils.extractRequestInstanceIdFromURI(uriList));
    // does not start with uri
    uriList.add("spiffe://athenz/sa/api");
    assertNull(X509CertUtils.extractRequestInstanceIdFromURI(uriList));
    // does not have correct format
    uriList.add("athenz://instanceid/provider-id-001");
    assertNull(X509CertUtils.extractRequestInstanceIdFromURI(uriList));
    // finally correct format
    uriList.add("athenz://instanceid/provider/id-001");
    assertEquals(X509CertUtils.extractRequestInstanceIdFromURI(uriList), "id-001");
}