refactor repository tests

:rabbit: