Fix Karaf dependencies and add tests

Change-Id: I38dbdb57aa209c2be291002567c3535e95ca1b28
Signed-off-by: Lorand Jakab <lojakab@cisco.com>