// Path: src/main/java/de/idrinth/stellaris/modtools/gui/ProgressElementGroup.java
// public interface ProgressElementGroup {
// 
//     void addToStepLabels(String text);
// 
//     void update(int current, int maximum);
//     
// }
// 
// Path: src/main/java/de/idrinth/stellaris/modtools/persistence/PersistenceProvider.java
// public class PersistenceProvider {
// 
//     private final EntityManagerFactory entityManager;
// 
//     public EntityManager get() {
//         return entityManager.createEntityManager();
//     }
// 
//     public PersistenceProvider() {
//         entityManager = Persistence.createEntityManagerFactory("de.idrinth_Stellaris.ModTools");
//     }
// }


import de.idrinth.stellaris.modtools.gui.ProgressElementGroup;
import de.idrinth.stellaris.modtools.persistence.PersistenceProvider;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import javax.persistence.EntityManager;
import junit.framework.Assert;
import org.junit.Test;
        public ProcessTask poll() {
            wasPulled = true;
            return task;
        }

        @Override
        public boolean hasNext() {
            return !wasPulled;
        }

        @Override
        public int getQueueSize() {
            return 1;
        }
        
    }
    private class TestProcessTask implements ProcessTask {
        public volatile boolean done=false;
        
        @Override
        public List<ProcessTask> handle(EntityManager manager) {
            done=true;
            return new ArrayList<>();
        }

        @Override
        public String getIdentifier() {
            return "demo";
        }
    }
// Path: src/main/java/de/idrinth/stellaris/modtools/gui/ProgressElementGroup.java
// public interface ProgressElementGroup {
// 
//     void addToStepLabels(String text);
// 
//     void update(int current, int maximum);
//     
// }
// 
// Path: src/main/java/de/idrinth/stellaris/modtools/persistence/PersistenceProvider.java
// public class PersistenceProvider {
// 
//     private final EntityManagerFactory entityManager;
// 
//     public EntityManager get() {
//         return entityManager.createEntityManager();
//     }
// 
//     public PersistenceProvider() {
//         entityManager = Persistence.createEntityManagerFactory("de.idrinth_Stellaris.ModTools");
//     }
// }


// Path: src/test/java/de/idrinth/stellaris/modtools/process/QueueTest.java
import de.idrinth.stellaris.modtools.gui.ProgressElementGroup;
import de.idrinth.stellaris.modtools.persistence.PersistenceProvider;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import javax.persistence.EntityManager;
import junit.framework.Assert;
import org.junit.Test;

        public ProcessTask poll() {
            wasPulled = true;
            return task;
        }

        @Override
        public boolean hasNext() {
            return !wasPulled;
        }

        @Override
        public int getQueueSize() {
            return 1;
        }
        
    }
    private class TestProcessTask implements ProcessTask {
        public volatile boolean done=false;
        
        @Override
        public List<ProcessTask> handle(EntityManager manager) {
            done=true;
            return new ArrayList<>();
        }

        @Override
        public String getIdentifier() {
            return "demo";
        }
    }
    private class TestProgressElementGroup implements ProgressElementGroup {