}
public void testUpdateFeedSubscription() throws Exception{
Date now = GregorianCalendar.getInstance().getTime();
FeedSubscription feed = feedDao.getSubscription(10);
assertEquals(300,feed.getBookmark().getId());
assertEquals("",feed.getMatchText());
assertEquals(true,feed.isAutoImport());
assertTrue(now.after(feed.getLastSync()));
assertNull(feed.getPubDate());
feed.setBookmark(new Bookmark(302));
feed.setMatchText("abcd 123");
feed.setAutoImport(false);
feed.setLastSync(now);
feed.setPubDate(now);
boolean okay = feedDao.updateSubscription(feed);
assertTrue(okay);
feed = feedDao.getSubscription(10);
assertEquals(302,feed.getBookmark().getId());
assertEquals("abcd 123",feed.getMatchText());
assertEquals(false,feed.isAutoImport());
assertNotNull(feed.getPubDate());
}