AlertTranslatorBolt extends BaseRichBolt { @SuppressWarnings("rawtypes") @Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { this.collector = collector; this.gson = new Gson(); this.validator = new AlertValidator(); }  @SuppressWarnings("rawtypes") @Override void prepare(Map stormConf, TopologyContext context, OutputCollector collector); @Override void execute(Tuple tuple); @Override void declareOutputFields(OutputFieldsDeclarer declarer);  }
@Test public void testPrepare() { AlertTranslatorBolt bolt = new AlertTranslatorBolt(); bolt.prepare(new HashMap<>(), null, mockCollector); assertEquals(mockCollector, bolt.getCollector()); }