GRECLIPSE-1638 Fix and tests
Preventing NPE
Fix for failed tests
For CI build