@Test public void handleNewTweetsTest() { try { opentipbotService.handleNewTweets(); } catch (OpenTipBotServiceException e) { e.printStackTrace(); } }
public void handleNewTweets() throws OpenTipBotServiceException { List<Tweet> incomingTweets = twitterTemplate.timelineOperations().getMentions(); logger.debug("Found "+incomingTweets.size()+" new tweets"); incomingTweets = filterTweets(incomingTweets); if (!incomingTweets.isEmpty()) { logger.info("Found "+incomingTweets.size()+" valid tweets"); logger.info("Persisting new opentipbot commands..."); persistOpenTipBotCommands(incomingTweets); logger.info(incomingTweets.size()+" commands saved successfully."); } logger.debug("Operation Complete"); }
OpenTipBotService { public void handleNewTweets() throws OpenTipBotServiceException { List<Tweet> incomingTweets = twitterTemplate.timelineOperations().getMentions(); logger.debug("Found "+incomingTweets.size()+" new tweets"); incomingTweets = filterTweets(incomingTweets); if (!incomingTweets.isEmpty()) { logger.info("Found "+incomingTweets.size()+" valid tweets"); logger.info("Persisting new opentipbot commands..."); persistOpenTipBotCommands(incomingTweets); logger.info(incomingTweets.size()+" commands saved successfully."); } logger.debug("Operation Complete"); } }
OpenTipBotService { public void handleNewTweets() throws OpenTipBotServiceException { List<Tweet> incomingTweets = twitterTemplate.timelineOperations().getMentions(); logger.debug("Found "+incomingTweets.size()+" new tweets"); incomingTweets = filterTweets(incomingTweets); if (!incomingTweets.isEmpty()) { logger.info("Found "+incomingTweets.size()+" valid tweets"); logger.info("Persisting new opentipbot commands..."); persistOpenTipBotCommands(incomingTweets); logger.info(incomingTweets.size()+" commands saved successfully."); } logger.debug("Operation Complete"); }  }
OpenTipBotService { public void handleNewTweets() throws OpenTipBotServiceException { List<Tweet> incomingTweets = twitterTemplate.timelineOperations().getMentions(); logger.debug("Found "+incomingTweets.size()+" new tweets"); incomingTweets = filterTweets(incomingTweets); if (!incomingTweets.isEmpty()) { logger.info("Found "+incomingTweets.size()+" valid tweets"); logger.info("Persisting new opentipbot commands..."); persistOpenTipBotCommands(incomingTweets); logger.info(incomingTweets.size()+" commands saved successfully."); } logger.debug("Operation Complete"); }  TwitterTemplate getTwitterTemplate(); @PostConstruct void init(); void handleNewTweets(); void handleNewTweet(Tweet tweet); void processNewOpenTipBotCommands(); List<OpenTipBotCommand> getLastTips(); }
OpenTipBotService { public void handleNewTweets() throws OpenTipBotServiceException { List<Tweet> incomingTweets = twitterTemplate.timelineOperations().getMentions(); logger.debug("Found "+incomingTweets.size()+" new tweets"); incomingTweets = filterTweets(incomingTweets); if (!incomingTweets.isEmpty()) { logger.info("Found "+incomingTweets.size()+" valid tweets"); logger.info("Persisting new opentipbot commands..."); persistOpenTipBotCommands(incomingTweets); logger.info(incomingTweets.size()+" commands saved successfully."); } logger.debug("Operation Complete"); }  TwitterTemplate getTwitterTemplate(); @PostConstruct void init(); void handleNewTweets(); void handleNewTweet(Tweet tweet); void processNewOpenTipBotCommands(); List<OpenTipBotCommand> getLastTips();  }