ConsecutiveDaysAccumulateFunction implements AccumulateFunction { @Override public void init(Serializable context) throws Exception { ConsecutiveDaysBuckets buckets = (ConsecutiveDaysBuckets) context; buckets.buckets = new HashMap<>(); }  @Override void accumulate(Serializable context, Object value); @Override Serializable createContext(); @Override Object getResult(Serializable context); @Override void init(Serializable context); @Override void reverse(Serializable context, Object value); @Override boolean supportsReverse(); @Override void writeExternal(ObjectOutput out); @Override void readExternal(ObjectInput in); @Override Class<?> getResultType();  }
@Test public void testInit() throws Exception { ConsecutiveDaysAccumulateFunction f = new ConsecutiveDaysAccumulateFunction(); ConsecutiveDaysAccumulateFunction.ConsecutiveDaysBuckets buckets = new ConsecutiveDaysAccumulateFunction.ConsecutiveDaysBuckets(); f.init(buckets); Assert.assertNotNull(buckets.buckets); Assert.assertEquals(0, buckets.buckets.size()); }