NoOpSourceOperationExecutor implements SourceOperationExecutor { @Override public void execute() throws Exception { SourceSplitRequest split = request.getSplit(); if (split != null) { this.response = new SourceOperationResponse() .setSplit(new SourceSplitResponse().setOutcome("SOURCE_SPLIT_OUTCOME_USE_CURRENT")); } else { throw new UnsupportedOperationException("Unsupported source operation request: " + request); } } NoOpSourceOperationExecutor(SourceOperationRequest request); @Override CounterSet getOutputCounters(); @Override SourceOperationResponse getResponse(); @Override void execute(); @Override Iterable<CounterUpdate> extractMetricUpdates();  }
@Test public void testNoOpSourceOperationExecutorWithNoSplitRequest() throws Exception { executor = new NoOpSourceOperationExecutor(new SourceOperationRequest()); thrown.expect(UnsupportedOperationException.class); thrown.expectMessage("Unsupported source operation request"); executor.execute(); }