@Test
public void test107RoleUserWillFetchOnlyHisOwnGroupDetails() {

	destroySession();
	
	RangerSecurityContext context = new RangerSecurityContext();
	context.setUserSession(new UserSessionBase());
	RangerContextHolder.setSecurityContext(context);
	UserSessionBase currentUserSession = ContextUtil.getCurrentUserSession();
	currentUserSession.setUserAdmin(false);
	XXPortalUser xXPortalUser = new XXPortalUser();
	xXPortalUser.setLoginId(userLoginID);
	xXPortalUser.setId(userId);
	currentUserSession.setXXPortalUser(xXPortalUser);
	List<String> permissionList = new ArrayList<String>();
	permissionList.add(RangerConstants.MODULE_USER_GROUPS);
	
	List<Long> groupIdList = new ArrayList<Long>();
	groupIdList.add(5L);
	
	VXGroup expectedVXGroup = new VXGroup();
	expectedVXGroup.setId(5L);
	expectedVXGroup.setName("testGroup");
	
	VXUser loggedInUser = vxUser();
	List<String> loggedInUserRole = new ArrayList<String>();
	loggedInUserRole.add(RangerConstants.ROLE_USER);
	loggedInUser.setId(8L);
	loggedInUser.setName("testuser");
	loggedInUser.setUserRoleList(loggedInUserRole);
	loggedInUser.setGroupIdList(groupIdList);
	
	VXUser vxUser = vxUser();
	List<String> userRole = new ArrayList<String>();
	userRole.add(RangerConstants.ROLE_USER);
	vxUser.setId(8L);
	vxUser.setName("test3");
	vxUser.setUserRoleList(userRole);
	vxUser.setUserSource(RangerCommonEnums.USER_UNIX);
	Mockito.when(xGroupService.readResourceWithOutLogin(5L)).thenReturn(expectedVXGroup);
	VXGroup rcvVXGroup = xUserMgr.getXGroup(5L);
	Assert.assertNotNull(rcvVXGroup);
	Assert.assertEquals(expectedVXGroup.getId(), rcvVXGroup.getId());
	Assert.assertEquals(expectedVXGroup.getName(), rcvVXGroup.getName());
}