Get rid of deprecated method usage in repo API tests

Change-Id: Id82b85f203429127c493ce721e19225e483d0945
Merge "Get rid of deprecated method usage in repo API tests"