Merge change 4196 into donut

* changes:
  Add tests to check permissions in PackageManager api's