Adding tests for claims to ItemTest.

Contains minor cleanup in Entity and Item classes.

Change-Id: Ia12a91f50c50cb47d627e3f232265d69fcb147c7