Use assertInstanceOf() instead of deprecated assertClass()