JBIDE-14314 unit tests and tiny changes to impl