long number = pushMessageInformationDao.getNumberOfPushMessagesForApplications(loginName);
assertThat(number).isEqualTo(1);
for (int i = 0; i < 100; i++) {
PushMessageInformation pmi = new PushMessageInformation();
pmi.setPushApplicationId(pushApp.getPushApplicationID());
pushMessageInformationDao.create(pmi);
}
number = pushMessageInformationDao.getNumberOfPushMessagesForApplications(loginName);
assertThat(number).isEqualTo(101);
// a few more for different PushApplication...
for (int i = 0; i < 100; i++) {
PushMessageInformation pmi = new PushMessageInformation();
pmi.setPushApplicationId(pushApp1.getPushApplicationID());
pushMessageInformationDao.create(pmi);
}
number = pushMessageInformationDao.getNumberOfPushMessagesForApplications(loginName);