Fix NPE running tests