@Test public void checkAccumulator() { MockIntentBatchDelegate delegate = new MockIntentBatchDelegate(); IntentAccumulator accumulator = new IntentAccumulator(delegate); List<IntentData> intentDataItems = ImmutableList.of( new IntentData(intent1, IntentState.INSTALLING, new MockTimestamp(1)), new IntentData(intent2, IntentState.INSTALLING, new MockTimestamp(1)), new IntentData(intent3, IntentState.INSTALLED, new MockTimestamp(1)), new IntentData(intent2, IntentState.INSTALLED, new MockTimestamp(1)), new IntentData(intent2, IntentState.INSTALLED, new MockTimestamp(1)), new IntentData(intent1, IntentState.INSTALLED, new MockTimestamp(1))); accumulator.processItems(intentDataItems); }
@Override public void processItems(List<IntentData> items) { ready = false; delegate.execute(reduce(items)); }
IntentAccumulator extends AbstractAccumulator<IntentData> { @Override public void processItems(List<IntentData> items) { ready = false; delegate.execute(reduce(items)); } }
IntentAccumulator extends AbstractAccumulator<IntentData> { @Override public void processItems(List<IntentData> items) { ready = false; delegate.execute(reduce(items)); } protected  IntentAccumulator(IntentBatchDelegate delegate); }
IntentAccumulator extends AbstractAccumulator<IntentData> { @Override public void processItems(List<IntentData> items) { ready = false; delegate.execute(reduce(items)); } protected  IntentAccumulator(IntentBatchDelegate delegate); @Override void processItems(List<IntentData> items); @Override boolean isReady(); void ready(); }
IntentAccumulator extends AbstractAccumulator<IntentData> { @Override public void processItems(List<IntentData> items) { ready = false; delegate.execute(reduce(items)); } protected  IntentAccumulator(IntentBatchDelegate delegate); @Override void processItems(List<IntentData> items); @Override boolean isReady(); void ready();  }