### Question:
ArrayTree { public K find( K key ) { if ( key == null ) { return null; } switch ( size ) { case 0: return null; case 1: if ( comparator.compare( array[0], key ) == 0 ) { return array[0]; } else { return null; } case 2: if ( comparator.compare( array[0], key ) == 0 ) { return array[0]; } else if ( comparator.compare( array[1], key ) == 0 ) { return array[1]; } else { return null; } default: int current = size >> 1; int start = 0; int end = size - 1; while ( end - start + 1 > 2 ) { int res = comparator.compare( array[current], key ); if ( res == 0 ) { return array[current]; } else if ( res < 0 ) { start = current; current = ( current + end + 1 ) >> 1; } else { end = current; current = ( current + start + 1 ) >> 1; } } switch ( end - start + 1 ) { case 1: if ( comparator.compare( array[start], key ) == 0 ) { return array[start]; } else { return null; } case 2: if ( comparator.compare( array[start], key ) == 0 ) { return array[start]; } else if ( comparator.compare( array[end], key ) == 0 ) { return array[end]; } else { return null; } default: return null; } } } 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 testFind() { ArrayTree<Integer> tree = createTree(); assertNull( tree.find( 3 ) ); tree.insert( 1 ); tree.insert( 70 ); tree.insert( 21 ); tree.insert( 12 ); tree.insert( 27 ); tree.insert( 11 ); assertNotNull( tree.find( 11 ) ); assertNull( tree.find( 0 ) ); }
@Test public void testFindEmptyTree() { ArrayTree<Integer> tree = createTree(); assertNull( tree.find( ONE ) ); }
@Test public void testFindNullFromEmptyTree() { ArrayTree<Integer> tree = createTree(); assertNull( tree.find( null ) ); }