Aggregations implements Serializable { public static <T extends Number & Comparable> Aggregation<T> min(){ return new Min<>(); } private  Aggregations(); static Aggregation<T> max(); static Aggregation<T> min(); static Aggregation<T> sum(); static Aggregation<T> avg();  }
@Test public void min() { Aggregation<Long> min = Aggregations.min(); min.aggregate(1L); min.aggregate(2L); min.aggregate(3L); min.aggregate(null); min.aggregate(4L); double aggregated = min.getAggregated(); Assert.assertEquals(1L, aggregated, DELTA); Assert.assertEquals("min", min.getIdentifier()); min.reset(); }
@Test public void minClone() { Aggregation<Long> min = ClonerUtil.clone(Aggregations.min()); min.aggregate(1L); min.aggregate(2L); min.aggregate(3L); min.aggregate(null); min.aggregate(4L); double aggregated = min.getAggregated(); Assert.assertEquals(1L, aggregated, DELTA); Assert.assertEquals("min", min.getIdentifier()); min.reset(); }