>
I'm not sure I agree, but that would be a separate discussion. Is there some blog post on this that I can read later?
The more you get used to OSGi basics, the more you will agree.
Probably a lot more in case you search for that using a search engine of your choice.
Not an easy lecture at all.
Regarding the black box vs. white box discussion. Well I don't want to start that discussion. Surely you can combine both. But you missed the main part. Having a test plugin (or bundle in correct OSGi terms) enables integration testing. Using a test bundle lets you create tests that execute in a different bundle, that means in a different classloader. So this way you are able to check if you run into classloading issues or if you missed to configure the exports correctly. If you use a test fragment you run in the same classloader and therefore would not uncover such issues. So for a good test coverage and integration testing you should have both, a test fragment and a test bundle, where mostly the test bundle is enough as it can be used for both.