Add repository API tests

Change-Id: I7cd0e2f6164facf70a9ffce56dc215955a82be83