SONARJAVA-248 Add unit test for NPE