Added InfrastructureApi unit tests

Same comment, move this method to the CloudApi.