int itemsOnPage = totalSize / pageCount;
int messageNumber = 1;
JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1@mail.com");
PageRequest pageRequest = new PageRequest("1", itemsOnPage);
PersistedObjectsFactory.preparePrivateMessages(messageNumber, userTo, userFrom);
Page<PrivateMessage> messagePage = dao.getDraftsForUser(userFrom, pageRequest);
assertEquals(messagePage.getTotalPages(), pageCount, "Incorrect count of pages.");