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