@Test public void testSumLong() { List<Integer> linkedList = new LinkedList<>(); Long resultOne = SumHelper.sumInteger(linkedList); assertEquals(0L, (long) resultOne); assertEquals(0, linkedList.size()); List<Long> linkedListTwo = new LinkedList<>(); linkedListTwo.add(resultOne); Long resultTwo = SumHelper.sumLong(linkedListTwo); assertEquals(0L, (long) resultTwo); assertEquals(1, linkedListTwo.size()); }
public static Long sumLong(Collection<Long> input) { Long sum = 0L; for (Long x : input) { sum += x; } return sum; }
SumHelper { public static Long sumLong(Collection<Long> input) { Long sum = 0L; for (Long x : input) { sum += x; } return sum; } }
SumHelper { public static Long sumLong(Collection<Long> input) { Long sum = 0L; for (Long x : input) { sum += x; } return sum; }  }
SumHelper { public static Long sumLong(Collection<Long> input) { Long sum = 0L; for (Long x : input) { sum += x; } return sum; }  static Long sumLong(Collection<Long> input); static Long sumInteger(Collection<Integer> input); static Double sumDouble(Collection<Double> input); }
SumHelper { public static Long sumLong(Collection<Long> input) { Long sum = 0L; for (Long x : input) { sum += x; } return sum; }  static Long sumLong(Collection<Long> input); static Long sumInteger(Collection<Integer> input); static Double sumDouble(Collection<Double> input);  }