Sums { public static ReduceByKey.CombineFunctionWithIdentity<Double> ofDoubles() { return SUMS_OF_DOUBLE; } private  Sums(); static ReduceByKey.CombineFunctionWithIdentity<Long> ofLongs(); static ReduceByKey.CombineFunctionWithIdentity<Integer> ofInts(); static ReduceByKey.CombineFunctionWithIdentity<Float> ofFloats(); static ReduceByKey.CombineFunctionWithIdentity<Double> ofDoubles();  }
@Test public void testSumOfDoubles() { assertEquals(6.0, (double) apply(Stream.of(1.0, 2.0, 3.0), Sums.ofDoubles()), 0.001); }