BACKLOG-5342: fix issue due to upgrade karaf version, also fix unit test