We are trying to migrate our tests to be compatible with Idea 2020.3 in anticipation of its release. We are having classloading issues, specifically when fetching services. Previously we could do something like this in our tests
final OurPluginClass someService = ServiceManager.getService(OurPluginClass.class);
now testing (`gradle :test`) against `LATEST-EAP-SNAPSHOT` a line like this produces `ClassCastException`s, like
java.lang.ClassCastException: class ....OurPluginClass cannot be cast to class ....OurPluginClass (....OurPluginClass is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @da53469; ....OurPluginClass is in unnamed module of loader 'app')
Investigation in the debugger reveals that inside the `ServiceManager` the `OurPluginClass` instance returned is created by the `PluginClassLoader`, however the code in `OurTestClass` is all loaded from `AppClassLoader`.
Is there any simple setting which we can use to make the test code load classes from the `PluginClassLoader`, or make the `ServiceManager` return instances loaded from the `AppClassLoader`?