InjectorBuilderImpl implements InjectorBuilder { @Override public InjectorBuilder withBundle(Class<? extends InjectBundle> bundleClass) { final InjectBundle bundle = newInstance(bundleClass); bundle.injectables().forEachOrdered(this::withComponent); return this; } InjectorBuilderImpl();   InjectorBuilderImpl(ClassLoader classLoader);   InjectorBuilderImpl(Set<Class<?>> injectables); private  InjectorBuilderImpl(ClassLoader classLoader, Set<Class<?>> injectables);   InjectorBuilderImpl(final InjectorBuilder toCopy); @Override InjectorBuilder withComponent(Class<?> injectableType); @Override InjectorBuilder withComponent(Class<T> injectableType, Supplier<T> instanceSupplier); @Override InjectorBuilder withBundle(Class<? extends InjectBundle> bundleClass); @Override InjectorBuilder withInjectorProxy(InjectorProxy injectorProxy); @Override InjectorBuilder withConfigFileLocation(Path configFile); @Override InjectorBuilder withParam(String name, String value); @Override InjectorBuilder before(ExecutionBuilder<T> executionBuilder); @Override Injector build(); @Override InjectorProxy proxyFor(Class<?> clazz); static final Logger INTERNAL_LOGGER; }
@Test void withBundle() throws InstantiationException { final Injector injector = instance.withBundle(TestBundle.class).build(); assertEquals(asList(Foo.class, Bar.class), injector.injectables().collect(toList())); }