implement repository test with mocking