FileReadKafkaProducer extends KafkaProducer { @Override public StormTopology getTopology(Config config) { spout = new FileReadSpout(FILE); return super.getTopology(config); }  @Override StormTopology getTopology(Config config); static final String FILE; }
@Test public void spoutShouldBeKafkaFileReadSpout() { KafkaProducer producer = new FileReadKafkaProducer(); producer.getTopology(new Config()); assertThat(producer.getSpout()).isInstanceOf(FileReadSpout.class); }