This test tests that the statement error callback is called in the right world.