added a test for java behavior on null
.gitignore for java