Extracted base repository
Add unit test for repository