Added unit tests for user