int pageCount = 2;
int itemsOnPage = totalSize / pageCount;
JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1@mail.com");
PageRequest pageRequest = new PageRequest("1",
itemsOnPage);
PersistedObjectsFactory.preparePrivateMessages(totalSize, userTo, userFrom);
Page<PrivateMessage> messagePage = dao.getDraftsForUser(userFrom, pageRequest);
for (PrivateMessage message : messagePage.getContent()) {