PageViewKafkaProducer extends KafkaProducer { @Override public StormTopology getTopology(Config config) { spout = new PageViewSpout(); return super.getTopology(config); }  @Override StormTopology getTopology(Config config);  }
@Test public void spoutShouldBeKafkaPageViewSpout() { KafkaProducer producer = new PageViewKafkaProducer(); producer.getTopology(new Config()); assertThat(producer.getSpout()).isInstanceOf(PageViewSpout.class); }