### Question:
ArrayTree { public List<K> getKeys() { List<K> list = new ArrayList<>( size ); for ( int i = 0; i < size; i++ ) { list.add( array[i] ); } return list; } ArrayTree( Comparator<K> comparator );  ArrayTree( Comparator<K> comparator, K[] array ); Comparator<K> getComparator(); K insert( K key ); K remove( K key ); boolean isEmpty(); int size(); List<K> getKeys(); void printTree(); K get( int position ); K getFirst(); K getLast(); K findGreater( K key ); K findGreaterOrEqual( K key ); K findLess( K key ); K findLessOrEqual( K key ); K find( K key ); int getPosition( K key ); int getAfterPosition( K key ); int getBeforePosition( K key ); boolean contains( K key ); String toString();  }### Answer:
@Test public void testGetKeys() { ArrayTree<Integer> tree = createTree(); tree.insert( 72 ); tree.insert( 79 ); tree.insert( 1 ); tree.insert( 2 ); tree.insert( 3 ); tree.insert( 7 ); tree.insert( 34 ); assertEquals( 7, tree.getKeys().size() ); }