@Test
public void testDeleteInstanceIdentity() {

    Principal principal = SimplePrincipal.create("user_domain", "user",
            "auth_creds", PRINCIPAL_AUTHORITY);
    ZTSRDLClientMock ztsClientMock = new ZTSRDLClientMock();
    ZTSClient client = new ZTSClient("http://localhost:4080", principal);
    client.setZTSRDLGeneratedClient(ztsClientMock);
    client.deleteInstanceIdentity("openstack.provider", "athenz", "storage", "instance-id");
    try {
        client.deleteInstanceIdentity("openstack.provider", "athenz", "storage", "bad-instance-id");
        fail();
    } catch (ZTSClientException ex) {
        assertEquals(ex.getCode(), 400);
    }
    client.close();
}