public class MockServices extends Object
If you need to register individual instances, and are using the
|Modifier and Type||Method and Description|
Set (or reset) the set of mock services.
public static void setServices(Class<?>... services) throws IllegalArgumentException
ServiceLoadershould both "see" the newly registered classes. (Other classes really registered in
META-INF/services/will also be available, but after the ones you have registered.) Each class must be public and concrete with a public no-arg constructor.
services- a set of service classes to register
IllegalArgumentException- if some classes are not instantiable as beans