[KARAF-2991] Add unit tests