EmojiCounterBolt extends ChatAlyticsBaseBolt { @Override public void prepare(ChatAlyticsConfig config, @SuppressWarnings("rawtypes") Map conf, TopologyContext context) { this.emojiDao = ChatAlyticsDAOFactory.createEmojiDAO(config); }  @Override void prepare(ChatAlyticsConfig config, @SuppressWarnings("rawtypes") Map conf,
                        TopologyContext context); @Override void execute(Tuple input, BasicOutputCollector collector); @Override void declareOutputFields(OutputFieldsDeclarer fields); @Override void cleanup(); static final String BOLT_ID; }
@Test public void testPrepare() { ChatAlyticsConfig config = new ChatAlyticsConfig(); config.computeConfig.apiRetries = 0; config.persistenceUnitName = "chatalytics-db-test"; Map<Object, Object> stormConf = Maps.newHashMapWithExpectedSize(1); stormConf.put(ConfigurationConstants.CHATALYTICS_CONFIG.txt, YamlUtils.writeYaml(config)); TopologyContext context = mock(TopologyContext.class); BasicOutputCollector collector = mock(BasicOutputCollector.class); underTest.prepare(stormConf, context); verifyZeroInteractions(context); verifyZeroInteractions(collector); }