java tests: fix NPE when actual == null
work in progress! started fixing ns bug