@Test public void shouldReverseLinkedListIterative() {

  ListNode<Integer> head = new ListNode<Integer>(1);
  ListNode<Integer> n2 = new ListNode<Integer>(2);
  ListNode<Integer> n3 = new ListNode<Integer>(3);
  ListNode<Integer> n4 = new ListNode<Integer>(4);
  head.setNext(n2);
  n2.setNext(n3);
  n3.setNext(n4);
  ListNode reversedList = reverseLinkedList.reverseIterative(head);
  assertEquals(n4, reversedList);
  assertEquals(n3, reversedList.getNext());
  assertEquals(n2, reversedList.getNext().getNext());
  assertEquals(head, reversedList.getNext().getNext().getNext());
}