test method for com.flatironschool.javacs.listsorter #topk int , java.util.list , java.util.comparator . concode_field_sep Comparator<Integer> comparator concode_elem_sep ListSorter<Integer> sorter concode_field_sep void testMergeSort concode_elem_sep void testInsertionSort concode_elem_sep void testHeapSort concode_elem_sep void testMergeSortInPlace concode_elem_sep void setUp concode_elem_sep void isSorted
void function ( ) { List < Integer > loc0 = new ArrayList < Integer > ( Arrays . asList ( 6 , 3 , 5 , 8 , 1 , 4 , 2 , 7 ) ) ; List < Integer > loc1 = sorter . topK ( 4 , loc0 , comparator ) ; assertThat ( loc1 . size ( ) , is ( 4 ) ) ; assertThat ( loc1 . get ( 0 ) , is ( 5 ) ) ; assertThat ( loc1 . get ( 1 ) , is ( 6 ) ) ; assertThat ( loc1 . get ( 2 ) , is ( 7 ) ) ; assertThat ( loc1 . get ( 3 ) , is ( 8 ) ) ; }