Fixing an NPE for tests (not fully setup data structures).