import org.junit.*;

public class NodeTest {

  @Test
  public void testAppendToTailToOneNode() {
    Node head      = new Node(10);
    Node afterHead = new Node(15);

    head.appendToTail(afterHead);
    Assert.assertEquals(head.next, afterHead);
  }

  @Test
  public void testAppendToTailToManyNodes() {
    Node head       = new Node(10);
    head.appendToTail(new Node(15));
    head.appendToTail(new Node(20));
    head.appendToTail(new Node(25));
    Node end        = new Node(30);

    head.appendToTail(end);
    Assert.assertEquals(head.next.next.next.next, end);
  }

  @Test
  public void testValidPalindrome() {
    Node head      = new Node(10);
    Node afterHead = new Node(15);

    head.appendToTail(afterHead);
    Assert.assertEquals(head.next, afterHead);
  }

  @Test
  public void testInvalidPalindrome() {
    Node head      = new Node(10);
    Node afterHead = new Node(15);

    head.appendToTail(afterHead);
    Assert.assertEquals(head.next, afterHead);
  }

  @Test
  public void testOneNodePalindrome() {
    Node head      = new Node(10);
    Node afterHead = new Node(15);

    head.appendToTail(afterHead);
    Assert.assertEquals(head.next, afterHead);
  }

  @Test
  public void testOneNodeFindMedian() {
    Node head      = new Node(10);
    Node afterHead = new Node(15);

    head.appendToTail(afterHead);
    Assert.assertEquals(head.next, afterHead);
  }

  @Test
  public void testOddNodeFindMedian() {
    Node head      = new Node(10);
    Node afterHead = new Node(15);

    head.appendToTail(afterHead);
    Assert.assertEquals(head.next, afterHead);
  }

  @Test
  public void testFindListLengthForOneNode() {
    Node head      = new Node(10);
    Node afterHead = new Node(15);

    head.appendToTail(afterHead);
    Assert.assertEquals(head.next, afterHead);
  }

  @Test
  public void testFindListLengthForManyNodes() {
    Node head      = new Node(10);
    Node afterHead = new Node(15);

    head.appendToTail(afterHead);
    Assert.assertEquals(head.next, afterHead);
  }
}

@@ -605,13 +605,15 @@
 test
-Valid
+OddNode
 Pali
@@ -634,32 +634,33 @@
  Node head      
+ 
 = new Node(10);%0A
@@ -663,33 +663,108 @@
 0);%0A    
-Node afterHead = 
+head.appendToTail(new Node(15));%0A    head.appendToTail(new Node(20));%0A    head.appendToTail(
 new Node
@@ -759,34 +759,34 @@
 ail(new Node(15)
+)
 ;
-%0A
 %0A    head.append
@@ -788,36 +788,40 @@
 ppendToTail(
-afterHead
+new Node(10)
 );%0A
+%0A
     Assert.a
@@ -829,35 +829,32 @@
 sert
-Equals(head.next, afterHead
+True(head.isPalindrome()
 );%0A 
@@ -887,15 +887,16 @@
 test
-Invalid
+EvenNode
 Pali
@@ -917,32 +917,33 @@
  Node head      
+ 
 = new Node(10);%0A
@@ -946,33 +946,71 @@
 0);%0A    
-Node afterHead = 
+head.appendToTail(new Node(15));%0A    head.appendToTail(
 new Node
@@ -1005,34 +1005,34 @@
 ail(new Node(15)
+)
 ;
-%0A
 %0A    head.append
@@ -1034,36 +1034,40 @@
 ppendToTail(
-afterHead
+new Node(10)
 );%0A
+%0A
     Assert.a
@@ -1075,35 +1075,32 @@
 sert
-Equals(head.next, afterHead
+True(head.isPalindrome()
 );%0A 
@@ -1129,23 +1129,23 @@
 oid test
-OneNode
+Invalid
 Palindro
@@ -1162,32 +1162,33 @@
  Node head      
+ 
 = new Node(10);%0A
@@ -1191,33 +1191,34 @@
 0);%0A    
-Node afterHead = 
+head.appendToTail(
 new Node
@@ -1213,34 +1213,34 @@
 ail(new Node(15)
+)
 ;
-%0A
 %0A    head.append
@@ -1242,36 +1242,77 @@
 ppendToTail(
-afterHead
+new Node(20));%0A    head.appendToTail(new Node(15)
 );%0A
+%0A
     Assert.a
@@ -1320,35 +1320,166 @@
 sert
-Equ
+F
 als
+e
 (head.
-next, afterHead
+isPalindrome());%0A  %7D%0A%0A  @Test%0A  public void testOneNodePalindrome() %7B%0A    Node head      = new Node(10);%0A%0A    Assert.assertTrue(head.isPalindrome()
 );%0A 

Write isPalindrome test cases.