Refactor project, make test on karaf -fails