FullObjectCreatorResolutionStrategy implements IResolveDependencyStrategy { @Override public <T> T resolve(Object... args) throws ResolveDependencyStrategyException { IObject config = (IObject) args[0]; try { IReceiverObjectCreator creator = null; List<IObject> filtersList = (List) config.getValue(filtersFieldName); for (IObject fDesc : filtersList) { creator = IOC.resolve( IOC.resolve( IOC.getKeyForKeyStorage(), fDesc.getValue(dependencyFieldName) ), creator, fDesc, config ); } return (T) creator; } catch (InvalidArgumentException | ReadValueException | ResolutionException e) { throw new ResolveDependencyStrategyException(e); } } FullObjectCreatorResolutionStrategy(); @Override T resolve(Object... args);  }
@Test public void Should_resolveCreatorsPipeline() throws Exception { IObject objectConfig = IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.iobject.IObject"), ("{" + " 'filters':[" + " {" + " 'dependency':'filter 1 dependency'" + " }," + "{" + " 'dependency':'filter 2 dependency'" + "}" + " ]" + "}").replace('\'','"')); IReceiverObjectCreator result = new FullObjectCreatorResolutionStrategy().resolve(objectConfig); assertSame(creator2Mock, result); }