Testing repository function