NewsReference newsRef = new NewsReference(fDao.saveNews(fFactory.createNews(null, feedRef.resolve(), new Date())).getId());
IAttachment attachment = fFactory.createAttachment(null, newsRef.resolve());
attachment.setUrl(new URI("http://www.attachment.com"));
final boolean attachmentEvents[] = new boolean[3];
final AttachmentReference attachmentReference[] = new AttachmentReference[1];
attachmentListener = new AttachmentAdapter() {
@Override
public void attachmentAdded(Set<AttachmentEvent> events) {
for (AttachmentEvent event : events) {
assertTrue("Expected this Event to be Root Event", event.isRoot());
attachmentEvents[0] = true;