[Icons] Ensure unit test compliance

API changes and some behavioral changes break
unit tests. Changes here fall into two
categories:

* Adjust unit tests to keep up with changes
* Add more checks to code to improve
  robustness (avoiding elaborate mocking
  when unit testing unrelated behavior)