public void testEnableRootOnInstanceFail() { URI endpoint = URI.create( "http://172.16.0.1:8776/v1/3456/instances/44b277eb-39be-4921-be31-3d61b43651d7/root"); InstanceApi api = requestsSendResponses( keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess, authenticatedGET().method("POST").endpoint(endpoint).build(), HttpResponse.builder() .statusCode(404) .payload(payloadFromResource("/instance_root.json")) .build()) .getInstanceApi("RegionOne"); String password = api.enableRoot("44b277eb-39be-4921-be31-3d61b43651d7"); assertEquals(password, null); }