I got the same error and easily fixed to add all the dependency services (i.e. @reference ) to context via context.registerService method. For example your service has a reference to QueryBuilder like @ @Referenceprivate QueryBuilder builder; then you need to do 2 things in your test class. first, c...