Fixed coverity issues
Fixed coverity issues.
Added OSGI tests