[--bugid=54831--] Add unit tests for Instances