Logical Unit Tests
Logical unit testing is the testing of a components logic without
requiring it to exist within a specific context. Often this involves
testing a components internal or private methods that are not export the
environment. Since OSGi only exposes only export packages to the platform,
logical unit tests must be defined in a special bundle known as a fragment
bundle. A fragment bundle is an extension of an existing
host bundle. This allows the fragment bundle to have full access (if
allowed via bundle security) to the resources in the host bundle.
Logical unit tests must be defined in a fragment bundle. This
will allow the JUnit test cases to access internal and private classes that
reside in the host bundle.