}
public void testAddNewsletterReport() throws Throwable {
Date date = new Date();
NewsletterReport newsletterReport1 = this._helper.createNewsletterReport(1, new Date(), "subject");
ContentReport contentReport1 = this._helper.createContentReport(1, newsletterReport1.getId(),
"ART1", "textBody1", "htmlBody1");
contentReport1.addRecipient("user1", "mail1@address.it");
contentReport1.addRecipient("user2", "mail2@address.it");
newsletterReport1.addContentReport(contentReport1);
ContentReport contentReport2 = this._helper.createContentReport(2, newsletterReport1.getId(),
"ART102", "textBody2", "htmlBody2");
contentReport2.addRecipient("user1", "mail1@address.it");
newsletterReport1.addContentReport(contentReport2);
NewsletterReport newsletterReport2 = this._helper.createNewsletterReport(2, new Date(date.getTime()+100), "subject");
ContentReport contentReport3 = this._helper.createContentReport(3, newsletterReport2.getId(),
"ART1", "textBody1", "htmlBody1");
newsletterReport2.addContentReport(contentReport3);
ContentReport contentReport4 = this._helper.createContentReport(4, newsletterReport2.getId(),
"ART102", "textBody2", "htmlBody2");
newsletterReport2.addContentReport(contentReport4);
try {
this._newsletterDAO.addNewsletterReport(newsletterReport1);