Sum { public static Combine.BinaryCombineDoubleFn ofDoubles() { return new SumDoubleFn(); } private  Sum(); static Combine.Globally<Integer, Integer> integersGlobally(); static Combine.PerKey<K, Integer, Integer> integersPerKey(); static Combine.Globally<Long, Long> longsGlobally(); static Combine.PerKey<K, Long, Long> longsPerKey(); static Combine.Globally<Double, Double> doublesGlobally(); static Combine.PerKey<K, Double, Double> doublesPerKey(); static Combine.BinaryCombineIntegerFn ofIntegers(); static Combine.BinaryCombineDoubleFn ofDoubles(); static Combine.BinaryCombineLongFn ofLongs();  }
@Test public void testSumDoubleFn() { testCombineFn(Sum.ofDoubles(), Lists.newArrayList(1.0, 2.0, 3.0, 4.0), 10.0); }
@Test public void testSumDoubleFnInfinity() { testCombineFn( Sum.ofDoubles(), Lists.newArrayList(Double.NEGATIVE_INFINITY, 2.0, 3.0, Double.POSITIVE_INFINITY), Double.NaN); }
@Test public void testSumDoubleFnPositiveInfinity() { testCombineFn( Sum.ofDoubles(), Lists.newArrayList(1.0, 2.0, 3.0, Double.POSITIVE_INFINITY), Double.POSITIVE_INFINITY); }
@Test public void testSumDoubleFnNegativeInfinity() { testCombineFn( Sum.ofDoubles(), Lists.newArrayList(Double.NEGATIVE_INFINITY, 2.0, 3.0, 4.0), Double.NEGATIVE_INFINITY); }
@Test public void testSumDoubleFnNan() { testCombineFn(Sum.ofDoubles(), Lists.newArrayList(1.0, 2.0, 3.0, Double.NaN), Double.NaN); }