Adding some unit tests, some of which currently fail.