// predefined shelf: is shared and owned by a predefined user
User preDefined = helper.getAllUsers(em).get(0);
User notPreDefined = helper.getAllUsers(em).get(1);
Shelf shelf = helper.getAllShelves(em).get(0); // this is a predefined shelf
Shelf shelf1 = new Shelf();
Shelf shelf2 = new Shelf();
Shelf shelf3 = new Shelf();
Shelf shelf4 = new Shelf();
shelf1.setName("shelf1");
shelf1.setDescription("predefined and shared shelf");
shelf1.setCreated(new Date());
shelf1.setShared(true);
shelf1.setOwner(preDefined);
shelf2.setName("shelf2");
shelf2.setDescription("not predefined and shared shelf");
shelf2.setCreated(new Date());
shelf2.setShared(true);
shelf2.setOwner(notPreDefined);
shelf3.setName("shelf3");
shelf3.setDescription("predefined and not shared shelf");
shelf3.setCreated(new Date());
shelf3.setShared(false);
shelf3.setOwner(preDefined);
shelf4.setName("shelf4");
shelf4.setDescription("not predefined and not shared shelf");
shelf4.setCreated(new Date());
shelf4.setShared(false);
shelf4.setOwner(notPreDefined);
sa.addShelf(shelf1);
sa.addShelf(shelf2);
sa.addShelf(shelf3);
sa.addShelf(shelf4);