@Test public void shouldSumNumbersWithDifferentSizes() { ListNode<Integer> n1 = createList(new int[] { 1, 5, 5 }); ListNode<Integer> n2 = createList(new int[] { 5 }); int result = sumLists.sum(n1, n2); assertEquals(160, result); }
public int sum(ListNode<Integer> n1, ListNode<Integer> n2) { validateInput(n1, n2); int n1Value = calculateNumber(n1); int n2Value = calculateNumber(n2); return n1Value + n2Value; }
SumLists { public int sum(ListNode<Integer> n1, ListNode<Integer> n2) { validateInput(n1, n2); int n1Value = calculateNumber(n1); int n2Value = calculateNumber(n2); return n1Value + n2Value; } }
SumLists { public int sum(ListNode<Integer> n1, ListNode<Integer> n2) { validateInput(n1, n2); int n1Value = calculateNumber(n1); int n2Value = calculateNumber(n2); return n1Value + n2Value; }  }
SumLists { public int sum(ListNode<Integer> n1, ListNode<Integer> n2) { validateInput(n1, n2); int n1Value = calculateNumber(n1); int n2Value = calculateNumber(n2); return n1Value + n2Value; }  int sumReverse(ListNode<Integer> n1, ListNode<Integer> n2); int sum(ListNode<Integer> n1, ListNode<Integer> n2); }
SumLists { public int sum(ListNode<Integer> n1, ListNode<Integer> n2) { validateInput(n1, n2); int n1Value = calculateNumber(n1); int n2Value = calculateNumber(n2); return n1Value + n2Value; }  int sumReverse(ListNode<Integer> n1, ListNode<Integer> n2); int sum(ListNode<Integer> n1, ListNode<Integer> n2);  }