Fix bad tests (NPE)