added unit tests for user