@Before public void init() throws IOException, ParserConfigurationException, InvalidRssFeedException, InvalidDateFormatException, SAXException, ParseException { rssFeedService = new RssFeedServiceImpl(); rssFeedService.setParser(parser); expectedFeed = getExpectedFeed(); when(parser.parse()).thenReturn(expectedFeed); }