}
@Test
@SuppressWarnings("all")
public void testAttachmentAddedUpdatedEvent() throws Exception {
AttachmentListener attachmentListener = null;
try {
IFeed feed = new Feed(new URL("inmemory://rss_2_0.xml")); //$NON-NLS-1$
feed = NewsModel.getDefault().getPersistenceLayer().getModelDAO().saveFeed(feed);
FeedReference feedRef = new FeedReference(feed.getId());
IBookMark bookmark = createBookMark(feed);
final int addedCounter[] = new int[] { 0 };
final int updatedCounter[] = new int[] { 0 };
attachmentListener = new AttachmentListener() {
public void attachmentAdded(Set<AttachmentEvent> events) {
addedCounter[0]++;
}
public void attachmentDeleted(Set<AttachmentEvent> events) {}