EventCorrelatingOutputCollector extends OutputCollector { @Override public void reportError(Throwable throwable) { delegate.reportError(throwable); } EventCorrelatingOutputCollector(TopologyContext topologyContext, OutputCollector delegate); @Override List<Integer> emit(String streamId, Tuple anchor, List<Object> tuple); @Override List<Integer> emit(Tuple anchor, List<Object> tuple); @Override List<Integer> emit(String streamId, List<Object> tuple); @Override List<Integer> emit(List<Object> tuple); @Override List<Integer> emit(Collection<Tuple> anchors, List<Object> tuple); @Override List<Integer> emit(String streamId, Collection<Tuple> anchors, List<Object> tuple); @Override void emitDirect(int taskId, String streamId, Tuple anchor, List<Object> tuple); @Override void emitDirect(int taskId, String streamId, List<Object> tuple); @Override void emitDirect(int taskId, Collection<Tuple> anchors, List<Object> tuple); @Override void emitDirect(int taskId, Tuple anchor, List<Object> tuple); @Override void emitDirect(int taskId, List<Object> tuple); @Override void emitDirect(int taskId, String streamId, Collection<Tuple> anchors, List<Object> tuple); @Override void ack(Tuple tuple); @Override void fail(Tuple tuple); @Override void resetTimeout(Tuple tuple); @Override void reportError(Throwable throwable);  }
@Test public void testReportError() throws Exception { setupExpectationsForTopologyContextNoEmit(); EventCorrelatingOutputCollector sut = getSystemUnderTest(); Throwable throwable = new RuntimeException("error"); sut.reportError(throwable); new Verifications() {{ mockedOutputCollector.reportError(throwable); times = 1; }}; }