### Question:
WebloggerRomeFeedFetcher extends RomeFeedFetcher { @Override public Subscription fetchSubscription(String feedURL, Date lastModified) throws FetcherException { if(feedURL == null) { throw new IllegalArgumentException("feed url cannot be null"); } if(!feedURL.startsWith("weblogger:")) { log.debug("Feed is remote, letting parent handle it - "+feedURL); return super.fetchSubscription(feedURL, lastModified); } String weblogHandle = null; String[] items = feedURL.split(":", 2); if(items != null && items.length > 1) { weblogHandle = items[1]; } log.debug("Handling LOCAL feed - "+feedURL); Weblog localWeblog; try { localWeblog = WebloggerFactory.getWeblogger().getWeblogManager() .getWeblogByHandle(weblogHandle); if (localWeblog == null) { throw new FetcherException("Local feed - "+feedURL+" no longer exists in weblogger"); } } catch (WebloggerException ex) { throw new FetcherException("Problem looking up local weblog - "+weblogHandle, ex); } if(lastModified != null && !localWeblog.getLastModified().after(lastModified)) { log.debug("Skipping unmodified LOCAL weblog"); return null; } Subscription newSub = new Subscription(); newSub.setFeedURL(feedURL); newSub.setSiteURL(WebloggerFactory.getWeblogger().getUrlStrategy().getWeblogURL(localWeblog, null, true)); newSub.setTitle(localWeblog.getName()); newSub.setAuthor(localWeblog.getName()); newSub.setLastUpdated(localWeblog.getLastModified()); if(newSub.getLastUpdated() == null) { newSub.setLastUpdated(new Date()); } try { int entryCount = WebloggerRuntimeConfig.getIntProperty("site.newsfeeds.defaultEntries"); if (log.isDebugEnabled()) { log.debug("Seeking up to " + entryCount + " entries from " + localWeblog.getHandle()); } WeblogEntryManager wmgr = WebloggerFactory.getWeblogger().getWeblogEntryManager(); WeblogEntrySearchCriteria wesc = new WeblogEntrySearchCriteria(); wesc.setWeblog(localWeblog); wesc.setStatus(PubStatus.PUBLISHED); wesc.setMaxResults(entryCount); List<WeblogEntry> entries = wmgr.getWeblogEntries(wesc); log.debug("Found " + entries.size()); PluginManager ppmgr = WebloggerFactory.getWeblogger().getPluginManager(); Map pagePlugins = ppmgr.getWeblogEntryPlugins(localWeblog); for ( WeblogEntry rollerEntry : entries ) { SubscriptionEntry entry = new SubscriptionEntry(); String content = ""; if (!StringUtils.isEmpty(rollerEntry.getText())) { content = rollerEntry.getText(); } else { content = rollerEntry.getSummary(); } content = ppmgr.applyWeblogEntryPlugins(pagePlugins, rollerEntry, content); entry.setAuthor(rollerEntry.getCreator().getScreenName()); entry.setTitle(rollerEntry.getTitle()); entry.setPubTime(rollerEntry.getPubTime()); entry.setText(content); entry.setPermalink(rollerEntry.getPermalink()); entry.setCategoriesString(rollerEntry.getCategory().getName()); newSub.addEntry(entry); } } catch (WebloggerException ex) { throw new FetcherException("Error processing entries for local weblog - "+weblogHandle, ex); } return newSub; } WebloggerRomeFeedFetcher(); @Override Subscription fetchSubscription(String feedURL, Date lastModified);  }### Answer:
@Test public void testFetchSubscription() throws Exception { try { FeedFetcher feedFetcher = WebloggerFactory.getWeblogger().getFeedFetcher(); Subscription sub = feedFetcher.fetchSubscription(feed_url); assertNotNull(sub); assertEquals(feed_url, sub.getFeedURL()); assertNotNull(sub.getLastUpdated()); Subscription updatedSub = feedFetcher.fetchSubscription(feed_url, sub.getLastUpdated()); assertNull(updatedSub); } catch (Throwable e) { e.printStackTrace(); } }