Implemented unit tests.