user repository with unit tests