public void addPredefineItems() { int sitesGenerationCount = rand.nextInt(10); for (int i = 0; i < sitesGenerationCount; i++) { String siteId = UUID.randomUUID().toString(); Site site = new Site(siteId, "SITE_" + i); // Generate groups: int groupsGenerationCount = rand.nextInt(10); for (int j = 0; j < groupsGenerationCount; j++) { String groupId = UUID.randomUUID().toString(); Group group = new Group(groupId, "GROUP_" + j, siteId); int innerGroupsGenerationCount = rand.nextInt(10); for (int k = 0; k < innerGroupsGenerationCount; k++) { String innerGroupId = UUID.randomUUID().toString(); Group innerGroup = new Group(innerGroupId, "GROUP_" + j + "_" + k, groupId); int widgetsGenerationCount = rand.nextInt(10); for (int l = 0; l < widgetsGenerationCount; l++) { Widget widget = new Widget(UUID.randomUUID().toString(), "WIDGET_" + l, innerGroupId); innerGroup.addWidget(widget); } group.addGroup(innerGroup); } site.addGroup(group); } this.sites.add(site); } }