@@ -0,0 +1,2366 @@
+package de.factoryfx.factory;%0A%0Aimport java.util.stream.Collectors;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport de.factoryfx.data.storage.DataAndNewMetadata;%0Aimport de.factoryfx.data.storage.inmemory.InMemoryDataStorage;%0Aimport de.factoryfx.factory.atrribute.FactoryReferenceListAttribute;%0Aimport de.factoryfx.factory.exception.RethrowingFactoryExceptionHandler;%0Aimport de.factoryfx.factory.log.FactoryUpdateLog;%0Aimport de.factoryfx.server.Microservice;%0A%0Apublic class FactoryReferenceListTest %7B%0A%0A    public static class ObjectFactory extends FactoryBase%3CObject, Void, RootFactory%3E %7B%0A        ObjectFactory() %7B%0A            configLiveCycle().setCreator(() -%3E %7B%0A                System.out.println(%22creator called %22 + getId());%0A                return new Object();%0A            %7D);%0A            configLiveCycle().setReCreator(old -%3E %7B%0A                System.out.println(%22reCreator called %22 + getId());%0A                return new Object();%0A            %7D);%0A            configLiveCycle().setStarter(o -%3E System.out.println(%22starter called %22 + getId()));%0A            configLiveCycle().setDestroyer(o -%3E System.out.println(%22destroyer called %22 + getId()));%0A        %7D%0A    %7D%0A%0A    public static class RootFactory extends SimpleFactoryBase%3CString, Void, RootFactory%3E %7B%0A%0A        public final FactoryReferenceListAttribute%3CObject, ObjectFactory%3E objects = new FactoryReferenceListAttribute%3C%3E(ObjectFactory.class);%0A%0A        @Override%0A        public String createImpl() %7B%0A            return objects.instances().stream().map(Object::toString).collect(Collectors.joining(%22, %22));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void referenceListTest() %7B%0A%0A        RootFactory rootFactory = new RootFactory();%0A        rootFactory.objects.add(new ObjectFactory());%0A        Microservice%3CVoid, RootFactory, Void%3E microService = new Microservice%3C%3E(new FactoryManager%3C%3E(new RethrowingFactoryExceptionHandler()), new InMemoryDataStorage%3C%3E(rootFactory));%0A        microService.start();%0A%0A%0A        %7B%0A            System.out.println(%22update started%22);%0A            DataAndNewMetadata%3CRootFactory%3E update1 = microService.prepareNewFactory();%0A            update1.root.objects.add(new ObjectFactory());%0A%0A            FactoryUpdateLog%3CRootFactory%3E res1 = microService.updateCurrentFactory(update1, %22root%22, %22update1%22, s -%3E true);%0A            Assert.assertTrue(res1.successfullyMerged());%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

add referenceListTest