@Test
public void TestGetUsersBasedOnRole() {

   try {
       XXPortalUser xXPortalUser = new XXPortalUser();
       xXPortalUser.setLoginId("testUser");
       xXPortalUser.setId(1L);
       xXPortalUser.setFirstName("testUser");
       xXPortalUser.setPublicScreenName("testUser");
       xXPortalUser.setPassword("testUserPassword");
       List<XXPortalUser> listXXPortalUser = new ArrayList<XXPortalUser>();
       listXXPortalUser.add(xXPortalUser);
       List<String> userRoleList = new ArrayList<String>();
       userRoleList.add("ROLE_SYS_ADMIN");
       Mockito.when(daoMgr.getXXPortalUser()).thenReturn(xXPortalUserDao);
       Mockito.when(xXPortalUserDao.findByRole(RangerConstants.ROLE_SYS_ADMIN)).thenReturn(listXXPortalUser);
       roleBasedUserSearchUtil.getUsersBasedOnRole(userRoleList);
       Mockito.verify(xXPortalUserDao).findByRole(RangerConstants.ROLE_SYS_ADMIN);
   } catch(Exception e) {
       fail("test failed due to: " + e.getMessage());
   }
}