As pointed out by @Jörg_Hoh , there's an even better way of doing it!
Create a map with the properties you want to pass to your
serviceMap parameters = new HashMap<>();
parameters.put("my_property","my property");You can then pass this to
your context with the registerInjectActivateService
method:context.registerInjectActivateService(myService, parameters);
_____________________________________Original answer:What you can do is
create a mock-implementation of your OSGI configuration interface.
p...