public class MockServices extends Object
TestCase.setUp().
If you need to register individual instances, and are using the Lookup
framework, try org.openide.util.test.MockLookup.
Lookup,
ServiceLoaderpublic static void setServices(Class<?>... services) throws IllegalArgumentException
Lookup and ServiceLoader should 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 registerIllegalArgumentException - if some classes are not instantiable as beansBuilt on May 22 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.