### Question:
FeedPostStatistics { public FeedPostStatistics(Feed feed) { if (feed.getLastPollTime() != null) { lastPollTime = feed.getLastPollTime().getTime(); } calculateStatistics(feed); } FeedPostStatistics(Feed feed); long getDelayToNewestPost(); long getTimeDifferenceNewestPostToLastPollTime(); long getTimeOldestPost(); long getTimeNewestPost(); long getMedianPostGap(); double getAveragePostGap(); List<Long> getIntervals(); long getPostGapStandardDeviation(); long getLongestPostGap(); double getAvgEntriesPerDay(); boolean isValidStatistics(); @Override String toString();  }### Answer:
@Test public void testFeedPostStatistics() throws FeedParserException, FileNotFoundException { FeedParser parser = new RomeFeedParser(); Feed feed = parser.getFeed(ResourceHelper.getResourceFile("/feeds/feed9.xml")); FeedPostStatistics fps = new FeedPostStatistics(feed); assertEquals(46619608, fps.getAveragePostGap(), 1); assertEquals(47. / 24, fps.getAvgEntriesPerDay(), 0.1); assertEquals(46, fps.getIntervals().size()); assertEquals(1478283000, fps.getLongestPostGap()); assertEquals(2009500, fps.getMedianPostGap()); assertEquals(1277851757000l, fps.getTimeOldestPost()); assertEquals(1279996259000l, fps.getTimeNewestPost()); assertEquals(2144502000, fps.getTimeRange()); assertEquals(24, fps.getTimeRangeInDays()); }