### Question:
InjectableFactory { public InjectableFactory<TP, TI> setInstance(TP param, TI instance) { getCache().put(getCacheKey(param), instance); return this; } protected  InjectableFactory(Function<? super TP, ? extends TI> creator, CacheProvider<TI> cacheProvider); static InjectableFactory<TP, TI> of(Function<TP, TI> objectCreator); static InjectableFactory<TP, TI> of(Function<TP, TI> objectCreator, CacheProvider cacheProvider); TI get(); TI get(TP param); InjectableFactory<TP, TI> setObjectCreator(Function<TP, TI> objectCreator); InjectableFactory<TP, TI> reset(); InjectableFactory<TP, TI> setInstance(TP param, TI instance); InjectableFactory<TP, TI> setInstance(TI instance); InjectableFactory<TP, TI> clearCache();  }### Answer:
@Test public void testSetInstance() { InjectableFactory<Void, I1> i1Fact = InjectableFactory.of((p) -> new C0(), CacheGlobal.get()); I1 inst = new I1() {}; i1Fact.setInstance(inst); assertEquals(inst, i1Fact.get()); }