Understanding assertInstanceOf