Implemented unit tests