This is the sortThree function with a test included.