public void testToSortedList() {
		arr = new ArrayBasedCollection<Integer>();
		IntegerComparator cmp = new IntegerComparator();
		for(int i = 10; i>0; i--){
			if(i%2 == 0)
				arr.add(i);
		}
		for(int i = 1; i<=10; i++){
			if(i%2 != 0)
				arr.add(i);
		}
		
		ArrayList<Integer> unsort = new ArrayList<Integer>();
		
		for(int i : arr)
			unsort.add(i);
		assertEquals(isSorted(unsort), false);//Assures that the list is unsorted and that the isSorted method works
		
		
		ArrayList<Integer> sorted = arr.toSortedList(cmp);
		
		assertEquals(isSorted(sorted), true);//Assuming the previous assertEquals holds, this proves that the collection is sorted correctly
	}