Use a mock GadgetRepo instead of LocalGadgetRepo::singleton()

Change-Id: Ib324ff6acc371be1f901c783a8ddaaadd63dd7dd