Added test functions

Added unit test for user entity.