Rejiggering a test to dodge an NPE.