XGroupPermissionService extends XGroupPermissionServiceBase<XXGroupPermission, VXGroupPermission> { public List<VXGroupPermission> getPopulatedVXGroupPermissionList(List<XXGroupPermission> xgroupPermissionList,Map<Long, XXGroup> xXGroupMap,VXModuleDef vModuleDef){ List<VXGroupPermission> vXGroupPermissionList = new ArrayList<VXGroupPermission>(); XXGroup xXGroup=null; for(XXGroupPermission xgroupPermission:xgroupPermissionList){ if(xXGroupMap.containsKey(xgroupPermission.getGroupId())){ xXGroup =xXGroupMap.get(xgroupPermission.getGroupId()); VXGroupPermission vXGrpPerm=new VXGroupPermission(); vXGrpPerm.setId(xgroupPermission.getId()); vXGrpPerm.setGroupId(xgroupPermission.getGroupId()); vXGrpPerm.setModuleId(xgroupPermission.getModuleId()); vXGrpPerm.setIsAllowed(xgroupPermission.getIsAllowed()); vXGrpPerm.setCreateDate(xgroupPermission.getCreateTime()); vXGrpPerm.setUpdateDate(xgroupPermission.getUpdateTime()); vXGrpPerm.setGroupName(xXGroup.getName()); vXGrpPerm.setModuleName(vModuleDef.getModule()); vXGroupPermissionList.add(vXGrpPerm); } } return vXGroupPermissionList; } XGroupPermissionService(); @Override VXGroupPermission populateViewBean(XXGroupPermission xObj); List<VXGroupPermission> getPopulatedVXGroupPermissionList(List<XXGroupPermission> xgroupPermissionList,Map<Long, XXGroup> xXGroupMap,VXModuleDef vModuleDef);  }
@Test public void test2GetPopulatedVXGroupPermissionList() { Map<Long, XXGroup> xXGroupMap = new HashMap<Long, XXGroup>(); List<XXGroupPermission> xgroupPermissionList = new ArrayList<XXGroupPermission>(); xGroupPermissionService.getPopulatedVXGroupPermissionList(xgroupPermissionList, xXGroupMap, vXModuleDef); }