Fixed null pointer in test.