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