Used repository pattern and Moq for testing