Introduced withCloudFoundryClient method to reduce duplication.