NPE in test fix