More mocking

Change-Id: I905ad1b3e7bca162dc143fd42ba058fdeb0b2bda
Refactor attributes to avoid multiple calls to same API

Change-Id: Ib4e957a1925a72a792409ac484c8539557024ab8