Fix unit test for console API and warning