AVLTree extends AbstractSelfBalancingBinarySearchTree { protected Node doubleRotateRightLeft(Node node) { node.right = avlRotateRight(node.right); return avlRotateLeft(node); }  @Override Node insert(int element); @Override Node delete(int element);  }
@Test public void testDoubleRotateRightLeft() { Node root = new AVLNode(5, null, null, null); Node rightChild = new AVLNode(8, root, null, null); root.right = rightChild; Node leftGrandChild = new AVLNode(7, rightChild, null, null); Node rightGrandChild = new AVLNode(10, rightChild, null, null); rightChild.left = leftGrandChild; rightChild.right = rightGrandChild; AVLTree tree = new AVLTree(); Node rotated = tree.doubleRotateRightLeft(root); Assert.assertEquals((int) rotated.value, 7); Assert.assertEquals((int) rotated.left.value, 5); Assert.assertEquals((int) rotated.right.value, 8); Assert.assertEquals((int) rotated.right.right.value, 10); Assert.assertNull(rotated.parent); Assert.assertEquals(rotated.left.parent.value, rotated.value); Assert.assertEquals(rotated.right.parent.value, rotated.value); Assert.assertEquals(rotated.right.right.parent.value, rotated.right.value); }