CMS-2311 Increase Java test coverage. Added more tests.