PageViewSpout extends BaseRichSpout { @Override public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields(FIELDS)); } PageViewSpout(boolean ackEnabled);  PageViewSpout(boolean ackEnabled, PageViewGenerator generator); @Override void declareOutputFields(OutputFieldsDeclarer declarer); @Override void open(Map conf, TopologyContext context, SpoutOutputCollector collector); @Override void nextTuple(); static final String FIELDS; }
@Test public void shouldDeclareOutputFields() { PageViewSpout spout = new PageViewSpout(false, generator); spout.declareOutputFields(declarer); verify(declarer, times(1)).declare(any(Fields.class)); }