### Question:
AVLTreeImpl implements IAVLBinaryTree<K, V> { @Override public K max() { opsCount++; if (root==null){ return null; } else { return max(root,root.key); } } AVLTreeImpl(boolean rotate); void resetOpsCount(); int getOpsCount(); @Override boolean isEmpty(); @Override int size(); @Override void add(K key, V data); @Override boolean remove(K key); @Override K min(); @Override K max(); @Override int height(); @Override K root(); @Override BSTNode<K,V> getRootNode(); @Override V find(K key); @Override List<K> preorderTraversal(); @Override List<K> postorderTraversal(); @Override List<K> inorderTraversal(); @Override List<K> levelorderTraversal(); static void main(String[] args);  }### Answer:
@Test public void testMax() { assertNull("Empty tree max was not null", tree.max()); tree.add(20, "SS"); assertEquals("One element tree max wrong", (Integer) 20, tree.max()); tree.add(30, "SS"); tree.add(35, "LL"); tree.add(40, "JJ"); tree.add(37, "df"); tree.add(36, "wer"); assertEquals("Multi-element tree max wrong", (Integer) 40, tree.max()); }