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