Implemented a few unittests.