Correct usage of SharedCorePlugin.inTestMode()

Correct cases where no behaviour was supposed to happen when in test mode
but the plug-in was referenced anyway. This would potentially cause
a NPE (in plain JUnit) or accessing the plug-in (in OSGi JUnit).