Add code coverage in resource list test

To cover the situation when resource has no resource name attribute.

Change-Id: Ifa5f20fbbd2385f5f71d53ecc1cff11d3935db04
Fix empty resource list index out of range error

The patch append resource_name into the fields when the resources are
empty. So to avoid the index out of range error.

Change-Id: I068d1ea199c7506aacaf4692479f9070107db724
Closes-Bug: #1307269
Merge "Add code coverage in resource list test"
Merge "Fix empty resource list index out of range error"