@Test(expected = IllegalArgumentException.class) public void shouldNotAcceptNullInstancesAsParameter2() { removeDuplicates.remove2(null); }
public void remove2(ListNode<Integer> head) { validateInput(head); ListNode<Integer> node = head; while (node != null) { removeNextNodesWithValue(node); node = node.getNext(); } }
RemoveListDuplicatedElements { public void remove2(ListNode<Integer> head) { validateInput(head); ListNode<Integer> node = head; while (node != null) { removeNextNodesWithValue(node); node = node.getNext(); } } }
RemoveListDuplicatedElements { public void remove2(ListNode<Integer> head) { validateInput(head); ListNode<Integer> node = head; while (node != null) { removeNextNodesWithValue(node); node = node.getNext(); } }  }
RemoveListDuplicatedElements { public void remove2(ListNode<Integer> head) { validateInput(head); ListNode<Integer> node = head; while (node != null) { removeNextNodesWithValue(node); node = node.getNext(); } }  void remove(ListNode<Integer> head); void remove2(ListNode<Integer> head); }
RemoveListDuplicatedElements { public void remove2(ListNode<Integer> head) { validateInput(head); ListNode<Integer> node = head; while (node != null) { removeNextNodesWithValue(node); node = node.getNext(); } }  void remove(ListNode<Integer> head); void remove2(ListNode<Integer> head);  }