fixes# MLHR-895
added more checks in test case
added the support for mapping between names and groups
Merge pull request #753 from gauravgopi123/MLHR-895

fixes# MLHR-895