### Question:
AVLTreeImpl implements IAVLBinaryTree<K, V> { @Override public List<K> preorderTraversal() { List<K> keyList = new ArrayList<K>(); preorderTraversal(root,keyList); return keyList; } 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 testPreorderTraversal() { List<Integer> list = tree.preorderTraversal(); assertTrue(list.isEmpty()); tree.add(13, "sdf"); tree.add(9, "wer"); tree.add(16,"sdxv"); tree.add(5, "wer"); tree.add(10, "sdf"); tree.add(1, "werf"); tree.add(6, "pk"); tree.add(14, "nn"); tree.add(26, "dd"); list = tree.preorderTraversal(); System.out.println("Pre: " + list.toString()); assertEquals("Wrong number of elements", 9 , list.size()); assertEquals("First element wrong", (Integer) 13, list.get(0) ); assertEquals((Integer) 9,list.get(1)); assertEquals((Integer) 5 , list.get(2)); assertEquals((Integer) 26, list.get(8)); }