Adding InstanceIdentifier UnitTests, fixing bug in previous unit tests, bug 1757.

Change-Id: I155672aae57a423f075aa3faebdfb3b504a02d1d
Signed-off-by: Alex Fan <railor33@gmail.com>