unifiedStatsCollector,
null,
null);
callback.setSourceMap(sourcesMap);
ConsumerCallbackResult startConsumptionRes = callback.onStartConsumption();
Assert.assertTrue(ConsumerCallbackResult.isFailure(startConsumptionRes),
"startConsumption() failed");
ConsumerCallbackResult startWindowRes = callback.onStartDataEventSequence(null);
Assert.assertTrue(ConsumerCallbackResult.isFailure(startWindowRes),
"startDataEventSequence() failed");
ConsumerCallbackResult startSourceRes = callback.onStartSource("source1", null);
Assert.assertTrue(ConsumerCallbackResult.isSuccess(startSourceRes),
"startSources(source1) succeeded");
ConsumerCallbackResult event1Res = callback.onDataEvent(event1, null);
Assert.assertTrue(ConsumerCallbackResult.isSuccess(event1Res),
"onDataEvent(1) succeeded");
ConsumerCallbackResult event2Res = callback.onDataEvent(event2, null);
Assert.assertTrue(ConsumerCallbackResult.isSuccess(event2Res),
"onDataEvent(2) queued up");
ConsumerCallbackResult event3Res = callback.onDataEvent(event1, null);
Assert.assertTrue(ConsumerCallbackResult.isSuccess(event3Res),
"onDataEvent(1) queued up");
ConsumerCallbackResult endSourceRes = callback.onEndSource("source1", null);
Assert.assertTrue(ConsumerCallbackResult.isFailure(endSourceRes),
"onEndSource fails because of timeout in onDataEvent(2)");
EasyMock.reset(mockConsumer1);
EasyMock.makeThreadSafe(mockConsumer1, true);