Some basic unit tests.

I really should add a more complete and thorough set.