Unit tests around the shifting functions.