Fixed unit tests

- add tenant to InMemoryRepository
- use NameId instead of ObjectId to reference users