fix NullPointerException in test
Merge pull request #939 from dwightguth/npe

fix NullPointerException in test