/** * Sets the global default lookup with some fixed instances. * Will also include (at a lower priority) a {@link ClassLoader}, * and services found from <code>META-INF/services/*</code> in the classpath. */ public static void setInstances (final @Nonnull Object... instances) { final ClassLoader l = MockLookup.class.getClassLoader(); METAINF_LOOKUP = Lookups.metaInfServices(l); setLookup(Lookups.fixed(instances), FILTERED_METAINF_LOOKUP, Lookups.singleton(l)); }