Add some unit tests for the instance group

Part of blueprint decouple-nested
Change-Id: I46c18a5545658a3a10c9eb3e9a6d1511bbe7a518
Merge "Add some unit tests for the instance group"