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