Implemented some unit tests