admin.setReceiveNewsLetter(true);
admin.setReceiveNotifications(true);
admin.setAccessLevel(AccessLevels.Administrator);
userAccountDAO.put(admin);
for (int i = 0; i < 2; i++) {
Company company = new Company();
company.setAccessLevel(AccessLevels.Company);
company.setLogin("company" + i + "@example.com");
company.setService(AuthTypes.GOOGLE);
company.setUniqueId(company.getLogin() + "-" + company.getService());
company.setLastname("Company " + i);
company.setFirstname("");
company.setStreet("Street adress for company " + 1);
company.setCity("City " + i);
company.setPhone("+212522" + (100000 + rand.nextInt(999999)));
company.setFax("+212522" + (100000 + rand.nextInt(999999)));
company.setMobile("+2126" + (10000000 + rand.nextInt(99999999)));
company.setEmail("contact@company" + i + ".com");
company.setWebsite("www.company" + i + ".com");
company.setReceiveNewsLetter(false);
company.setReceiveNotifications(false);
company.setLastLoginOn(calendar.getTime());
companyDAO.put(company);
for (int j = 0; j < 2; j++) {
Publisher publisher = new Publisher();
publisher.setAccessLevel(AccessLevels.Publisher);
publisher.setLogin("publisher" + j + "@company" + i + ".com");
publisher.setService(AuthTypes.GOOGLE);
publisher.setUniqueId(publisher.getLogin() + "-" + publisher.getService());
publisher.setFirstname("Publisher");
publisher.setLastname(j + "-" + i);
publisher.setPhone("+212522" + (100000 + rand.nextInt(999999)));
publisher.setEmail("publisher" + j + "@company" + i + ".com");
ArrayList<Long> products = new ArrayList<Long>();
ArrayList<Long> slots = new ArrayList<Long>();
publisherDAO.put(publisher);
publisher.setCompanyId(company.getId());
for (int k = 0; k < 5; k++) {
Product product = new Product();
product.setName("Product" + k + "-" + j + "-" + i);
product.setSlogan("Slogan");
product.setText("Text");