Understanding assertInstanceOf successfully