}
public void testRemoveFactories() throws Exception {
List<Factory<?>> factories = new ArrayList<>();
factories.add(new NormalDistributionFactory());
factories.add(new ExponentialDistributionFactory());
FactoryDataSynchronizer.addNewFactories(factories, dataStorage);
factories.remove(1);
for (int i = 0; i < TRIALS; i++) {
FactoryDataSynchronizer.removeOldFactories(factories, dataStorage);
assertEquals(1, dataStorage.getFactories().size());