SplayTree extends AbstractSelfBalancingBinarySearchTree { @Override public Node insert(int element) { Node insertNode = super.insert(element); splay(insertNode); return insertNode; }  @Override Node search(int element); @Override Node insert(int element); @Override Node delete(int element);  }
@Test public void testInsert() { SplayTree splayTree = new SplayTree(); splayTree.insert(24); splayTree.insert(20); splayTree.insert(30); splayTree.insert(39); splayTree.insert(80); splayTree.insert(11); Assert.assertEquals(splayTree.root.value, (Integer) 11); Assert.assertEquals(splayTree.root.right.value, (Integer) 80); Assert.assertNull(splayTree.root.right.right); Assert.assertEquals(splayTree.root.right.left.value, (Integer) 30); Assert.assertEquals(splayTree.root.right.left.right.value, (Integer) 39); Assert.assertEquals(splayTree.root.right.left.left.value, (Integer) 20); Assert.assertEquals(splayTree.root.right.left.left.right.value, (Integer) 24); testTreeBSTProperties(splayTree.root); }