public void testLoadNewsletterContentIds() throws Throwable {
EntitySearchFilter[] filters = { };
List<String> userGroupCodes = new ArrayList<String>();
userGroupCodes.add(Group.FREE_GROUP_NAME);
NewsletterSearchBean searchBean = new NewsletterSearchBean();
List<String> contentIds = this._newsletterManager.loadNewsletterContentIds(filters, userGroupCodes, searchBean);
this.compareIds(contentIds, new String[] { "ART180" });
try {
this._newsletterManager.addContentToQueue("ART180");
searchBean.setInQueue(new Boolean(false));
contentIds = this._newsletterManager.loadNewsletterContentIds(filters, userGroupCodes, searchBean);
this.compareIds(contentIds, new String[] { });
searchBean.setInQueue(new Boolean(true));
contentIds = this._newsletterManager.loadNewsletterContentIds(filters, userGroupCodes, searchBean);
this.compareIds(contentIds, new String[] { "ART180" });
NewsletterReport newsletterReport = this._helper.createNewsletterReport(1, new Date(), "subject");
ContentReport contentReport = this._helper.createContentReport(1, newsletterReport.getId(),
"ART180", "textBody1", "htmlBody1");
newsletterReport.addContentReport(contentReport);
this._newsletterDAO.addNewsletterReport(newsletterReport);
searchBean.setSent(new Boolean(true));
contentIds = this._newsletterManager.loadNewsletterContentIds(filters, userGroupCodes, searchBean);
this.compareIds(contentIds, new String[] { "ART180" });
searchBean.setSent(new Boolean(false));
contentIds = this._newsletterManager.loadNewsletterContentIds(filters, userGroupCodes, searchBean);
this.compareIds(contentIds, new String[] { });
searchBean.setInQueue(new Boolean(false));
searchBean.setSent(new Boolean(true));
contentIds = this._newsletterManager.loadNewsletterContentIds(filters, userGroupCodes, searchBean);
this.compareIds(contentIds, new String[] { });
searchBean.setInQueue(null);
searchBean.setSent(new Boolean(true));
contentIds = this._newsletterManager.loadNewsletterContentIds(filters, userGroupCodes, searchBean);
this.compareIds(contentIds, new String[] { "ART180" });
searchBean.setSent(new Boolean(false));
contentIds = this._newsletterManager.loadNewsletterContentIds(filters, userGroupCodes, searchBean);
this.compareIds(contentIds, new String[] { });
} catch (Throwable t) {
throw t;
} finally {