Add repository pattern with repository test.