Tests for User class.
Merge pull request #831 from lvotypko/userTest

Tests for User class.