I have a method that uses ServiceLoader
to load services using resources.
public List getContextData(int Id)
{
List li
You need to copy the "provider-configuration file" into your test class directory.
assuming your test class files are located at
test/classes/
you need to copy the "provider-configuration file" to
test/classes/META-INF/services/your.package.ContextPlugin
How to copy the files depend on your build tool (e.g. maven, gradle, ant, ...)
As example for maven you should store them in the test resources folder.
src/test/resources/META-INF/services/your.package.ContextPlugin