Add test for getting repository twice