test repository function