fix NPE in test