Added helper method and GetAppliedPolicies test cases