@Test public void shouldResultBeCorrect() { final SumConsolidator consolidator = new SumConsolidator(); consolidator.accumulate(2L, 1); consolidator.accumulate(1L, 2); consolidator.accumulate(4L, 3); consolidator.accumulate(3L, 4); Assert.assertEquals(10, consolidator.consolidateAndReset()); }
@Override public void accumulate(final long timestamp, final int value) { setCurrentResult(value + getCurrentResult()); }
SumConsolidator extends BaseStreamingConsolidator { @Override public void accumulate(final long timestamp, final int value) { setCurrentResult(value + getCurrentResult()); } }
SumConsolidator extends BaseStreamingConsolidator { @Override public void accumulate(final long timestamp, final int value) { setCurrentResult(value + getCurrentResult()); }  }
SumConsolidator extends BaseStreamingConsolidator { @Override public void accumulate(final long timestamp, final int value) { setCurrentResult(value + getCurrentResult()); }  @Override void accumulate(final long timestamp, final int value); }
SumConsolidator extends BaseStreamingConsolidator { @Override public void accumulate(final long timestamp, final int value) { setCurrentResult(value + getCurrentResult()); }  @Override void accumulate(final long timestamp, final int value);  }