Implemented a number of unit tests.