@Test public void reportError() throws Exception { setupExpectationsForTopologyContextNoEmit(); setupExpectationsForEventCorrelationInjector(); sut = new EventCorrelatingSpoutOutputCollector(mockedTopologyContext, mockedOutputCollector); Deencapsulation.setField(sut, "eventCorrelationInjector", mockEventCorrelationInjector); Throwable throwable = new RuntimeException("error"); sut.reportError(throwable); new Verifications() {{ mockedOutputCollector.reportError(throwable); times = 1; }}; }
@Override public void reportError(Throwable throwable) { delegate.reportError(throwable); }
EventCorrelatingSpoutOutputCollector extends SpoutOutputCollector { @Override public void reportError(Throwable throwable) { delegate.reportError(throwable); } }
EventCorrelatingSpoutOutputCollector extends SpoutOutputCollector { @Override public void reportError(Throwable throwable) { delegate.reportError(throwable); } EventCorrelatingSpoutOutputCollector(TopologyContext topologyContext, SpoutOutputCollector delegate); }
EventCorrelatingSpoutOutputCollector extends SpoutOutputCollector { @Override public void reportError(Throwable throwable) { delegate.reportError(throwable); } EventCorrelatingSpoutOutputCollector(TopologyContext topologyContext, SpoutOutputCollector delegate); @Override List<Integer> emit(String streamId, List<Object> tuple); @Override List<Integer> emit(List<Object> tuple); @Override List<Integer> emit(String streamId, List<Object> tuple, Object messageId); @Override List<Integer> emit(List<Object> tuple, Object messageId); @Override void emitDirect(int taskId, String streamId, List<Object> tuple); @Override void emitDirect(int taskId, List<Object> tuple); @Override void emitDirect(int taskId, String streamId, List<Object> tuple, Object messageId); @Override void emitDirect(int taskId, List<Object> tuple, Object messageId); @Override void reportError(Throwable throwable); @Override long getPendingCount(); }
EventCorrelatingSpoutOutputCollector extends SpoutOutputCollector { @Override public void reportError(Throwable throwable) { delegate.reportError(throwable); } EventCorrelatingSpoutOutputCollector(TopologyContext topologyContext, SpoutOutputCollector delegate); @Override List<Integer> emit(String streamId, List<Object> tuple); @Override List<Integer> emit(List<Object> tuple); @Override List<Integer> emit(String streamId, List<Object> tuple, Object messageId); @Override List<Integer> emit(List<Object> tuple, Object messageId); @Override void emitDirect(int taskId, String streamId, List<Object> tuple); @Override void emitDirect(int taskId, List<Object> tuple); @Override void emitDirect(int taskId, String streamId, List<Object> tuple, Object messageId); @Override void emitDirect(int taskId, List<Object> tuple, Object messageId); @Override void reportError(Throwable throwable); @Override long getPendingCount();  }