/*
 * Copyright (C) 2014 Pedro Vicente Gómez Sánchez.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.pedrovgs.problem22;

/**
 * @author Pedro Vicente Gómez Sánchez.
 */
public class ReverseLinkedListTest {
}

@@ -649,91 +649,1100 @@
 2;%0A%0A
-/**%0A * @author Pedro Vicente G%C3%B3mez S%C3%A1nchez.%0A */%0Apublic class ReverseLinkedListTest %7B
+import com.github.pedrovgs.linkedlist.ListNode;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A/**%0A * @author Pedro Vicente G%C3%B3mez S%C3%A1nchez.%0A */%0Apublic class ReverseLinkedListTest %7B%0A%0A  private ReverseLinkedList reverseLinkedList;%0A%0A  @Before public void setUp() %7B%0A    reverseLinkedList = new ReverseLinkedList();%0A  %7D%0A%0A  @Test(expected = IllegalArgumentException.class) public void shouldNotAcceptNullElements() %7B%0A    reverseLinkedList.reverse(null);%0A  %7D%0A%0A  @Test public void shouldAcceptLinkedListWithJustOneElement() %7B%0A    ListNode%3CInteger%3E head = new ListNode%3CInteger%3E(1);%0A%0A    assertEquals(head, reverseLinkedList.reverse(head));%0A  %7D%0A%0A  @Test public void shouldReverseLinkedList() %7B%0A    ListNode%3CInteger%3E head = new ListNode%3CInteger%3E(1);%0A    ListNode%3CInteger%3E n2 = new ListNode%3CInteger%3E(2);%0A    ListNode%3CInteger%3E n3 = new ListNode%3CInteger%3E(3);%0A    ListNode%3CInteger%3E n4 = new ListNode%3CInteger%3E(4);%0A    head.setNext(n2);%0A    n2.setNext(n3);%0A%0A    ListNode reversedList = reverseLinkedList.reverse(head);%0A    %0A    assertEquals(n4, reversedList);%0A  %7D
 %0A%7D%0A

Add some tests to problem 22