public void testDeleteBookmark() throws Exception {
    FeedSubscription sub = feedManager.getSubscription(400);
    assertNotNull(sub);

    boolean deleted = bookmarkManager.deleteBookmark(new Bookmark(300));
    assertTrue(deleted);

    bookmarkManager.shutdown();

    sub = feedManager.getSubscription(400);
    assertNull(sub);
  }
  public void testUpdateBookmark() throws Exception {
    Bookmark bm = bookmarkManager.getBookmark(301);
    bm.setTags("subscribe:this abc");
    bookmarkManager.updateBookmark(bm);
    bookmarkManager.shutdown();

    FeedSubscription feed =
        feedManager.getSubscription(new User(1), "http://rss.slashdot.org/Slashdot/slashdot");
    assertNotNull(feed);
  }
 public void testDoCrawl2() throws Exception {
   FeedSubscription feed402 = feedManager.getSubscription(402);
   FeedCrawlResult result = crawler.doCrawl(feed402);
   assertEquals(159, result.getEntries().size());
   boolean foundGeoRss = false;
   for (BookmarkEntry e : result.getEntries()) {
     if (e.getPointMarkers().isEmpty() == false) {
       foundGeoRss = true;
       break;
     }
   }
   assertTrue(foundGeoRss);
 }
  public void testAddBookmark() throws Exception {
    Bookmark b = new Bookmark();
    b.setTitle("some feed");
    b.setLink(new Link("http://link.com/rss", MIMEType.APP_RSS_XML));
    b.setTags("123 subscribe:this foo bar");
    b.setUser(new User(1));

    int id = bookmarkManager.addBookmark(b);
    assertTrue((id > 0));
    bookmarkManager.shutdown();

    FeedSubscription sub = feedManager.getSubscription(new User(1), "http://link.com/rss");
    assertNotNull(sub);
  }