Fixed ProfileClient and associated tests; fixed HDInsight tests
Merge pull request #2868 from stankovski/refactoring

Fixed ProfileClient and associated tests; fixed HDInsight tests