From 52e14f16d40bfc504dd8ce28db192f19ddb8670a Mon Sep 17 00:00:00 2001
From: Nelson Tavares de Sousa <stu103017@mail.uni-kiel.de>
Date: Mon, 22 Jun 2015 13:32:41 +0200
Subject: [PATCH] renamed Analysis to Execution; updated StageTester

---
 ...ition.java => AbstractCompositeStage.java} |  4 +--
 .../{Analysis.java => Execution.java}         | 36 +++++++++----------
 ...Exception.java => ExecutionException.java} |  4 +--
 ...ation.java => ExecutionInstantiation.java} |  6 ++--
 .../teetime/framework/test/StageTester.java   |  9 +++--
 .../teetime/stage/io/EveryXthPrinter.java     |  4 +--
 .../teetime/stage/string/WordCounter.java     |  4 +--
 .../teetime/examples/cipher/CipherTest.java   |  6 ++--
 .../examples/tokenizer/TokenizerTest.java     |  6 ++--
 .../{AnalysisTest.java => ExecutionTest.java} | 24 ++++++-------
 .../framework/RunnableConsumerStageTest.java  | 22 ++++++------
 .../java/teetime/framework/StageTest.java     |  2 +-
 .../java/teetime/framework/TraversorTest.java |  2 +-
 .../ExceptionHandlingTest.java                | 16 ++++-----
 .../teetime/stage/InstanceOfFilterTest.java   | 10 +++---
 15 files changed, 77 insertions(+), 78 deletions(-)
 rename src/main/java/teetime/framework/{AbstractStageComposition.java => AbstractCompositeStage.java} (91%)
 rename src/main/java/teetime/framework/{Analysis.java => Execution.java} (87%)
 rename src/main/java/teetime/framework/{AnalysisException.java => ExecutionException.java} (91%)
 rename src/main/java/teetime/framework/{AnalysisInstantiation.java => ExecutionInstantiation.java} (94%)
 rename src/test/java/teetime/framework/{AnalysisTest.java => ExecutionTest.java} (87%)

diff --git a/src/main/java/teetime/framework/AbstractStageComposition.java b/src/main/java/teetime/framework/AbstractCompositeStage.java
similarity index 91%
rename from src/main/java/teetime/framework/AbstractStageComposition.java
rename to src/main/java/teetime/framework/AbstractCompositeStage.java
index 86567aec..2a9f0e79 100644
--- a/src/main/java/teetime/framework/AbstractStageComposition.java
+++ b/src/main/java/teetime/framework/AbstractCompositeStage.java
@@ -23,11 +23,11 @@ package teetime.framework;
  *
  *
  */
-public abstract class AbstractStageComposition extends Configuration {
+public abstract class AbstractCompositeStage extends Configuration {
 
 	private final ConfigurationContext context;
 
-	public AbstractStageComposition(final ConfigurationContext context) {
+	public AbstractCompositeStage(final ConfigurationContext context) {
 		this.context = context;
 	}
 
diff --git a/src/main/java/teetime/framework/Analysis.java b/src/main/java/teetime/framework/Execution.java
similarity index 87%
rename from src/main/java/teetime/framework/Analysis.java
rename to src/main/java/teetime/framework/Execution.java
index fbc63b73..042584b4 100644
--- a/src/main/java/teetime/framework/Analysis.java
+++ b/src/main/java/teetime/framework/Execution.java
@@ -34,7 +34,7 @@ import teetime.framework.validation.AnalysisNotValidException;
 import teetime.util.Pair;
 
 /**
- * Represents an Analysis to which stages can be added and executed later.
+ * Represents an Execution to which stages can be added and executed later.
  * This needs a {@link ConfigurationContext},
  * in which the adding and configuring of stages takes place.
  * To start the analysis {@link #executeBlocking()} needs to be executed.
@@ -45,9 +45,9 @@ import teetime.util.Pair;
  * @param <T>
  *            the type of the {@link ConfigurationContext}
  */
-public final class Analysis<T extends ConfigurationContext> implements UncaughtExceptionHandler {
+public final class Execution<T extends ConfigurationContext> implements UncaughtExceptionHandler {
 
-	private static final Logger LOGGER = LoggerFactory.getLogger(Analysis.class);
+	private static final Logger LOGGER = LoggerFactory.getLogger(Execution.class);
 
 	private final T configuration;
 
@@ -64,32 +64,32 @@ public final class Analysis<T extends ConfigurationContext> implements UncaughtE
 	private final List<RunnableProducerStage> producerRunnables = new LinkedList<RunnableProducerStage>();
 
 	/**
-	 * Creates a new {@link Analysis} that skips validating the port connections and uses the default listener.
+	 * Creates a new {@link Execution} that skips validating the port connections and uses the default listener.
 	 *
 	 * @param configuration
 	 *            to be used for the analysis
 	 */
-	public Analysis(final T configuration) {
+	public Execution(final T configuration) {
 		this(configuration, false, new IgnoringExceptionListenerFactory());
 	}
 
-	public Analysis(final T configuration, final boolean validationEnabled) {
+	public Execution(final T configuration, final boolean validationEnabled) {
 		this(configuration, validationEnabled, new IgnoringExceptionListenerFactory());
 	}
 
 	/**
-	 * Creates a new {@link Analysis} that skips validating the port connections and uses a specific listener.
+	 * Creates a new {@link Execution} that skips validating the port connections and uses a specific listener.
 	 *
 	 * @param configuration
 	 *            to be used for the analysis
 	 * @param factory
 	 *            specific listener for the exception handling
 	 */
-	public Analysis(final T configuration, final IExceptionListenerFactory factory) {
+	public Execution(final T configuration, final IExceptionListenerFactory factory) {
 		this(configuration, false, factory);
 	}
 
-	public Analysis(final T configuration, final boolean validationEnabled, final IExceptionListenerFactory factory) {
+	public Execution(final T configuration, final boolean validationEnabled, final IExceptionListenerFactory factory) {
 		this.configuration = configuration;
 		this.factory = factory;
 		if (validationEnabled) {
@@ -118,8 +118,8 @@ public final class Analysis<T extends ConfigurationContext> implements UncaughtE
 	 *
 	 */
 	private final void init() {
-		AnalysisInstantiation analysisInstantiation = new AnalysisInstantiation(configuration);
-		analysisInstantiation.instantiatePipes();
+		ExecutionInstantiation executionInstantiation = new ExecutionInstantiation(configuration);
+		executionInstantiation.instantiatePipes();
 
 		final Set<Stage> threadableStageJobs = this.configuration.getThreadableStages();
 		if (threadableStageJobs.isEmpty()) {
@@ -194,7 +194,7 @@ public final class Analysis<T extends ConfigurationContext> implements UncaughtE
 	/**
 	 * Calling this method will block the current thread, until the analysis terminates.
 	 *
-	 * @throws AnalysisException
+	 * @throws ExecutionException
 	 *             if at least one exception in one thread has occurred within the analysis. The exception contains the pairs of thread and throwable
 	 *
 	 * @since 1.1
@@ -209,7 +209,7 @@ public final class Analysis<T extends ConfigurationContext> implements UncaughtE
 				thread.join();
 			}
 		} catch (InterruptedException e) {
-			LOGGER.error("Analysis has stopped unexpectedly", e);
+			LOGGER.error("Execution has stopped unexpectedly", e);
 			for (Thread thread : this.finiteProducerThreads) {
 				thread.interrupt();
 			}
@@ -224,7 +224,7 @@ public final class Analysis<T extends ConfigurationContext> implements UncaughtE
 		}
 
 		if (!exceptions.isEmpty()) {
-			throw new AnalysisException(exceptions);
+			throw new ExecutionException(exceptions);
 		}
 	}
 
@@ -244,9 +244,9 @@ public final class Analysis<T extends ConfigurationContext> implements UncaughtE
 	}
 
 	/**
-	 * This method will start the Analysis and block until it is finished.
+	 * This method will start the Execution and block until it is finished.
 	 *
-	 * @throws AnalysisException
+	 * @throws ExecutionException
 	 *             if at least one exception in one thread has occurred within the analysis. The exception contains the pairs of thread and throwable.
 	 *
 	 * @since 1.1
@@ -285,9 +285,9 @@ public final class Analysis<T extends ConfigurationContext> implements UncaughtE
 	}
 
 	/**
-	 * Retrieves the Configuration which was used to add and arrange all stages needed for the Analysis
+	 * Retrieves the Configuration which was used to add and arrange all stages needed for the Execution
 	 *
-	 * @return the configuration used for the Analysis
+	 * @return the configuration used for the Execution
 	 */
 	public T getConfiguration() {
 		return this.configuration;
diff --git a/src/main/java/teetime/framework/AnalysisException.java b/src/main/java/teetime/framework/ExecutionException.java
similarity index 91%
rename from src/main/java/teetime/framework/AnalysisException.java
rename to src/main/java/teetime/framework/ExecutionException.java
index 90fcdcf7..0f123784 100644
--- a/src/main/java/teetime/framework/AnalysisException.java
+++ b/src/main/java/teetime/framework/ExecutionException.java
@@ -25,7 +25,7 @@ import teetime.util.Pair;
  *
  * @since 1.1
  */
-public class AnalysisException extends RuntimeException {
+public class ExecutionException extends RuntimeException {
 
 	/**
 	 *
@@ -34,7 +34,7 @@ public class AnalysisException extends RuntimeException {
 
 	private final Collection<Pair<Thread, Throwable>> exceptions;
 
-	public AnalysisException(final Collection<Pair<Thread, Throwable>> exceptions) {
+	public ExecutionException(final Collection<Pair<Thread, Throwable>> exceptions) {
 		super("Error(s) while running analysis. Check thrown exceptions.");
 		this.exceptions = exceptions;
 	}
diff --git a/src/main/java/teetime/framework/AnalysisInstantiation.java b/src/main/java/teetime/framework/ExecutionInstantiation.java
similarity index 94%
rename from src/main/java/teetime/framework/AnalysisInstantiation.java
rename to src/main/java/teetime/framework/ExecutionInstantiation.java
index 48d824b1..f5254532 100644
--- a/src/main/java/teetime/framework/AnalysisInstantiation.java
+++ b/src/main/java/teetime/framework/ExecutionInstantiation.java
@@ -28,9 +28,9 @@ import teetime.framework.pipe.SingleElementPipeFactory;
 import teetime.framework.pipe.SpScPipeFactory;
 import teetime.framework.pipe.UnboundedSpScPipeFactory;
 
-class AnalysisInstantiation {
+class ExecutionInstantiation {
 
-	private static final Logger LOGGER = LoggerFactory.getLogger(AnalysisInstantiation.class);
+	private static final Logger LOGGER = LoggerFactory.getLogger(ExecutionInstantiation.class);
 
 	private final IPipeFactory interBoundedThreadPipeFactory = new SpScPipeFactory();
 	private final IPipeFactory interUnboundedThreadPipeFactory = new UnboundedSpScPipeFactory();
@@ -38,7 +38,7 @@ class AnalysisInstantiation {
 
 	private final ConfigurationContext configuration;
 
-	public AnalysisInstantiation(final ConfigurationContext configuration) {
+	public ExecutionInstantiation(final ConfigurationContext configuration) {
 		this.configuration = configuration;
 	}
 
diff --git a/src/main/java/teetime/framework/test/StageTester.java b/src/main/java/teetime/framework/test/StageTester.java
index dea7016c..b9c55537 100644
--- a/src/main/java/teetime/framework/test/StageTester.java
+++ b/src/main/java/teetime/framework/test/StageTester.java
@@ -19,9 +19,9 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import teetime.framework.Analysis;
 import teetime.framework.ConfigurationContext;
-import teetime.framework.AnalysisException;
+import teetime.framework.Execution;
+import teetime.framework.ExecutionException;
 import teetime.framework.Stage;
 import teetime.framework.StageState;
 import teetime.stage.CollectorSink;
@@ -72,14 +72,14 @@ public final class StageTester {
 	/**
 	 * This method will start the test and block until it is finished.
 	 *
-	 * @throws AnalysisException
+	 * @throws ExecutionException
 	 *             if at least one exception in one thread has occurred within the analysis.
 	 *             The exception contains the pairs of thread and throwable.
 	 *
 	 */
 	public void start() {
 		final ConfigurationContext configuration = new Configuration(inputHolders, stage, outputHolders);
-		final Analysis<ConfigurationContext> analysis = new Analysis<ConfigurationContext>(configuration);
+		final Execution<ConfigurationContext> analysis = new Execution<ConfigurationContext>(configuration);
 		analysis.executeBlocking();
 	}
 
@@ -89,7 +89,6 @@ public final class StageTester {
 			for (InputHolder<?> inputHolder : inputHolders) {
 				final InitialElementProducer<Object> producer = new InitialElementProducer<Object>(inputHolder.getInput());
 				connectPorts(producer.getOutputPort(), inputHolder.getPort());
-				addThreadableStage(producer);
 			}
 
 			addThreadableStage(stage);
diff --git a/src/main/java/teetime/stage/io/EveryXthPrinter.java b/src/main/java/teetime/stage/io/EveryXthPrinter.java
index 3eaa7751..24eb08ec 100644
--- a/src/main/java/teetime/stage/io/EveryXthPrinter.java
+++ b/src/main/java/teetime/stage/io/EveryXthPrinter.java
@@ -18,7 +18,7 @@ package teetime.stage.io;
 import java.util.ArrayList;
 import java.util.List;
 
-import teetime.framework.AbstractStageComposition;
+import teetime.framework.AbstractCompositeStage;
 import teetime.framework.ConfigurationContext;
 import teetime.framework.InputPort;
 import teetime.framework.OutputPort;
@@ -27,7 +27,7 @@ import teetime.stage.EveryXthStage;
 import teetime.stage.basic.distributor.CopyByReferenceStrategy;
 import teetime.stage.basic.distributor.Distributor;
 
-public final class EveryXthPrinter<T> extends AbstractStageComposition {
+public final class EveryXthPrinter<T> extends AbstractCompositeStage {
 
 	private final Distributor<T> distributor;
 	private final List<Stage> lastStages = new ArrayList<Stage>();
diff --git a/src/main/java/teetime/stage/string/WordCounter.java b/src/main/java/teetime/stage/string/WordCounter.java
index 6ca7b91a..08e10ed9 100644
--- a/src/main/java/teetime/stage/string/WordCounter.java
+++ b/src/main/java/teetime/stage/string/WordCounter.java
@@ -17,7 +17,7 @@ package teetime.stage.string;
 
 import java.util.ArrayList;
 
-import teetime.framework.AbstractStageComposition;
+import teetime.framework.AbstractCompositeStage;
 import teetime.framework.ConfigurationContext;
 import teetime.framework.InputPort;
 import teetime.framework.OutputPort;
@@ -34,7 +34,7 @@ import teetime.stage.util.CountingMap;
  * @author Nelson Tavares de Sousa
  *
  */
-public final class WordCounter extends AbstractStageComposition {
+public final class WordCounter extends AbstractCompositeStage {
 
 	// This fields are needed for the methods to work.
 	private final Tokenizer tokenizer = new Tokenizer(" ");
diff --git a/src/test/java/teetime/examples/cipher/CipherTest.java b/src/test/java/teetime/examples/cipher/CipherTest.java
index da9562ed..ca53aa4a 100644
--- a/src/test/java/teetime/examples/cipher/CipherTest.java
+++ b/src/test/java/teetime/examples/cipher/CipherTest.java
@@ -21,7 +21,7 @@ import java.io.IOException;
 import org.junit.Assert;
 import org.junit.Test;
 
-import teetime.framework.Analysis;
+import teetime.framework.Execution;
 import teetime.framework.ConfigurationContext;
 
 import com.google.common.io.Files;
@@ -44,8 +44,8 @@ public class CipherTest {
 		final String password = "Password";
 
 		final ConfigurationContext configuration = new CipherConfiguration(inputFile, outputFile, password);
-		final Analysis analysis = new Analysis(configuration);
-		analysis.executeBlocking();
+		final Execution execution = new Execution(configuration);
+		execution.executeBlocking();
 
 		Assert.assertTrue(Files.equal(new File(inputFile), new File(outputFile)));
 	}
diff --git a/src/test/java/teetime/examples/tokenizer/TokenizerTest.java b/src/test/java/teetime/examples/tokenizer/TokenizerTest.java
index 070c7224..c78d6969 100644
--- a/src/test/java/teetime/examples/tokenizer/TokenizerTest.java
+++ b/src/test/java/teetime/examples/tokenizer/TokenizerTest.java
@@ -22,7 +22,7 @@ import java.nio.charset.Charset;
 import org.junit.Assert;
 import org.junit.Test;
 
-import teetime.framework.Analysis;
+import teetime.framework.Execution;
 
 import com.google.common.io.Files;
 
@@ -42,8 +42,8 @@ public class TokenizerTest {
 		final String password = "Password";
 
 		final TokenizerConfiguration configuration = new TokenizerConfiguration(inputFile, password);
-		final Analysis analysis = new Analysis(configuration);
-		analysis.executeBlocking();
+		final Execution execution = new Execution(configuration);
+		execution.executeBlocking();
 
 		final String string = Files.toString(new File("src/test/resources/data/input.txt"), Charset.forName("UTF-8"));
 
diff --git a/src/test/java/teetime/framework/AnalysisTest.java b/src/test/java/teetime/framework/ExecutionTest.java
similarity index 87%
rename from src/test/java/teetime/framework/AnalysisTest.java
rename to src/test/java/teetime/framework/ExecutionTest.java
index 02872fc7..c32c39f5 100644
--- a/src/test/java/teetime/framework/AnalysisTest.java
+++ b/src/test/java/teetime/framework/ExecutionTest.java
@@ -33,38 +33,38 @@ import teetime.stage.InstanceOfFilter;
 import teetime.stage.basic.Sink;
 import teetime.util.StopWatch;
 
-public class AnalysisTest {
+public class ExecutionTest {
 
 	private static final long DELAY_IN_MS = 500;
 	private static final long ABSOLUTE_MAX_ERROR_IN_MS = 2;
 
-	private Analysis<TestConfig> analysis;
+	private Execution<TestConfig> execution;
 
 	@Before
 	public void before() {
 		TestConfig configuration = new TestConfig();
-		analysis = new Analysis<TestConfig>(configuration);
+		execution = new Execution<TestConfig>(configuration);
 	}
 
 	@Test
 	public void testExecuteNonBlocking() throws Exception {
 		StopWatch watch = new StopWatch();
 		watch.start();
-		analysis.executeNonBlocking();
+		execution.executeNonBlocking();
 		watch.end();
 
 		assertThat(watch.getDurationInMs(), is(lessThan(DELAY_IN_MS)));
-		assertFalse(analysis.getConfiguration().delay.finished);
+		assertFalse(execution.getConfiguration().delay.finished);
 
-		analysis.waitForTermination();
-		assertTrue(analysis.getConfiguration().delay.finished);
+		execution.waitForTermination();
+		assertTrue(execution.getConfiguration().delay.finished);
 	}
 
 	@Test
 	public void testExecuteBlocking() {
 		StopWatch watch = new StopWatch();
 		watch.start();
-		analysis.executeBlocking();
+		execution.executeBlocking();
 		watch.end();
 
 		assertThat(watch.getDurationInMs() + ABSOLUTE_MAX_ERROR_IN_MS, is(greaterThanOrEqualTo(DELAY_IN_MS)));
@@ -105,10 +105,10 @@ public class AnalysisTest {
 
 	@Test
 	public void testInstantiatePipes() throws Exception {
-		Analysis<AnalysisTestConfig> interAnalysis = new Analysis<AnalysisTestConfig>(new AnalysisTestConfig(true));
+		Execution<AnalysisTestConfig> interAnalysis = new Execution<AnalysisTestConfig>(new AnalysisTestConfig(true));
 		assertThat(interAnalysis.getConfiguration().init.getOwningThread(), is(not(interAnalysis.getConfiguration().sink.getOwningThread())));
 
-		Analysis<AnalysisTestConfig> intraAnalysis = new Analysis<AnalysisTestConfig>(new AnalysisTestConfig(false));
+		Execution<AnalysisTestConfig> intraAnalysis = new Execution<AnalysisTestConfig>(new AnalysisTestConfig(false));
 		assertThat(intraAnalysis.getConfiguration().init.getOwningThread(), is(intraAnalysis.getConfiguration().sink.getOwningThread()));
 	}
 
@@ -133,7 +133,7 @@ public class AnalysisTest {
 		thrown.expect(IllegalStateException.class);
 		thrown.expectMessage("Crossing threads");
 		InvalidTestConfig configuration = new InvalidTestConfig();
-		new Analysis<InvalidTestConfig>(configuration);
+		new Execution<InvalidTestConfig>(configuration);
 	}
 
 	private class InvalidTestConfig extends ConfigurationContext {
@@ -153,7 +153,7 @@ public class AnalysisTest {
 	@Test
 	public void automaticallyAddHeadStages() {
 		AutomaticallyConfig context = new AutomaticallyConfig();
-		new Analysis<ConfigurationContext>(context).executeBlocking();
+		new Execution<ConfigurationContext>(context).executeBlocking();
 		assertTrue(context.executed);
 	}
 
diff --git a/src/test/java/teetime/framework/RunnableConsumerStageTest.java b/src/test/java/teetime/framework/RunnableConsumerStageTest.java
index 5be8ef32..b74a255e 100644
--- a/src/test/java/teetime/framework/RunnableConsumerStageTest.java
+++ b/src/test/java/teetime/framework/RunnableConsumerStageTest.java
@@ -34,11 +34,11 @@ public class RunnableConsumerStageTest {
 	public void testWaitingInfinitely() throws Exception {
 		RunnableConsumerStageTestConfiguration configuration = new RunnableConsumerStageTestConfiguration();
 
-		final Analysis analysis = new Analysis(configuration);
+		final Execution execution = new Execution(configuration);
 		final Thread thread = new Thread(new Runnable() {
 			@Override
 			public void run() {
-				start(analysis);
+				start(execution);
 			}
 		});
 		thread.start();
@@ -59,8 +59,8 @@ public class RunnableConsumerStageTest {
 	public void testCorrectStartAndTerminatation() throws Exception {
 		RunnableConsumerStageTestConfiguration configuration = new RunnableConsumerStageTestConfiguration(0, 1, 2, 3, 5);
 
-		final Analysis analysis = new Analysis(configuration);
-		start(analysis);
+		final Execution execution = new Execution(configuration);
+		start(execution);
 
 		assertEquals(5, configuration.getCollectedElements().size());
 	}
@@ -69,7 +69,7 @@ public class RunnableConsumerStageTest {
 	// public void testWaitingInfinitely() throws Exception {
 	// WaitStrategyConfiguration waitStrategyConfiguration = new WaitStrategyConfiguration(300, 42);
 	//
-	// final Analysis analysis = new Analysis(waitStrategyConfiguration);
+	// final Execution analysis = new Execution(waitStrategyConfiguration);
 	// Thread thread = new Thread(new Runnable() {
 	// @Override
 	// public void run() {
@@ -88,7 +88,7 @@ public class RunnableConsumerStageTest {
 	// public void testWaitingFinitely() throws Exception {
 	// WaitStrategyConfiguration waitStrategyConfiguration = new WaitStrategyConfiguration(300, 42);
 	//
-	// final Analysis analysis = new Analysis(waitStrategyConfiguration);
+	// final Execution analysis = new Execution(waitStrategyConfiguration);
 	// Thread thread = new Thread(new Runnable() {
 	// @Override
 	// public void run() {
@@ -109,19 +109,19 @@ public class RunnableConsumerStageTest {
 	public void testYieldRun() throws Exception {
 		YieldStrategyConfiguration waitStrategyConfiguration = new YieldStrategyConfiguration(42);
 
-		final Analysis analysis = new Analysis(waitStrategyConfiguration);
+		final Execution execution = new Execution(waitStrategyConfiguration);
 
-		start(analysis);
+		start(execution);
 
 		assertEquals(42, waitStrategyConfiguration.getCollectorSink().getElements().get(0));
 		assertEquals(1, waitStrategyConfiguration.getCollectorSink().getElements().size());
 	}
 
-	private void start(final Analysis analysis) {
+	private void start(final Execution execution) {
 		Collection<Pair<Thread, Throwable>> exceptions = new ArrayList<Pair<Thread, Throwable>>();
 		try {
-			analysis.executeBlocking();
-		} catch (AnalysisException e) {
+			execution.executeBlocking();
+		} catch (ExecutionException e) {
 			exceptions = e.getThrownExceptions();
 		}
 		for (Pair<Thread, Throwable> pair : exceptions) {
diff --git a/src/test/java/teetime/framework/StageTest.java b/src/test/java/teetime/framework/StageTest.java
index d21612f8..10725dd1 100644
--- a/src/test/java/teetime/framework/StageTest.java
+++ b/src/test/java/teetime/framework/StageTest.java
@@ -47,7 +47,7 @@ public class StageTest {
 	@Test
 	public void testSetOwningThread() throws Exception {
 		TestConfig tc = new TestConfig();
-		new Analysis<TestConfig>(tc);
+		new Execution<TestConfig>(tc);
 		assertEquals(tc.init.owningThread, tc.delay.owningThread);
 		assertThat(tc.delay.exceptionHandler, is(notNullValue()));
 		assertEquals(tc.init.exceptionHandler, tc.delay.exceptionHandler);
diff --git a/src/test/java/teetime/framework/TraversorTest.java b/src/test/java/teetime/framework/TraversorTest.java
index 7d32f1f7..6079aa01 100644
--- a/src/test/java/teetime/framework/TraversorTest.java
+++ b/src/test/java/teetime/framework/TraversorTest.java
@@ -42,7 +42,7 @@ public class TraversorTest {
 	@Test
 	public void traverse() {
 		TestConfiguration tc = new TestConfiguration();
-		new Analysis<TestConfiguration>(tc);
+		new Execution<TestConfiguration>(tc);
 		traversor.traverse(tc.init);
 		Set<Stage> comparingStages = new HashSet<Stage>();
 		comparingStages.add(tc.init);
diff --git a/src/test/java/teetime/framework/exceptionHandling/ExceptionHandlingTest.java b/src/test/java/teetime/framework/exceptionHandling/ExceptionHandlingTest.java
index 1dc02f2b..d264619e 100644
--- a/src/test/java/teetime/framework/exceptionHandling/ExceptionHandlingTest.java
+++ b/src/test/java/teetime/framework/exceptionHandling/ExceptionHandlingTest.java
@@ -22,29 +22,29 @@ import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 
-import teetime.framework.Analysis;
-import teetime.framework.AnalysisException;
+import teetime.framework.Execution;
+import teetime.framework.ExecutionException;
 import teetime.framework.StageState;
 
 public class ExceptionHandlingTest {
 
-	private Analysis<ExceptionTestConfiguration> analysis;
+	private Execution<ExceptionTestConfiguration> execution;
 
 	public ExceptionTestConfiguration newInstances() {
 		ExceptionTestConfiguration configuration = new ExceptionTestConfiguration();
-		analysis = new Analysis<ExceptionTestConfiguration>(configuration, new TestListenerFactory());
+		execution = new Execution<ExceptionTestConfiguration>(configuration, new TestListenerFactory());
 		return configuration;
 	}
 
 	public void exceptionPassingAndTermination() {
 		newInstances();
-		analysis.executeBlocking();
+		execution.executeBlocking();
 		assertEquals(TestListener.exceptionInvoked, 2); // listener did not kill thread too early
 	}
 
 	public void terminatesAllStages() {
 		ExceptionTestConfiguration config = newInstances();
-		analysis.executeBlocking();
+		execution.executeBlocking();
 		assertThat(config.first.getCurrentState(), is(StageState.TERMINATED));
 		assertThat(config.second.getCurrentState(), is(StageState.TERMINATED));
 		assertThat(config.third.getCurrentState(), is(StageState.TERMINATED));
@@ -56,7 +56,7 @@ public class ExceptionHandlingTest {
 			boolean exceptionArised = false;
 			try {
 				exceptionPassingAndTermination();
-			} catch (AnalysisException e) {
+			} catch (ExecutionException e) {
 				exceptionArised = true;
 			}
 			assertTrue(exceptionArised);
@@ -64,7 +64,7 @@ public class ExceptionHandlingTest {
 			exceptionArised = false;
 			try {
 				terminatesAllStages();
-			} catch (AnalysisException e) {
+			} catch (ExecutionException e) {
 				exceptionArised = true;
 			}
 			assertTrue(exceptionArised);
diff --git a/src/test/java/teetime/stage/InstanceOfFilterTest.java b/src/test/java/teetime/stage/InstanceOfFilterTest.java
index 6dbf6807..6b385175 100644
--- a/src/test/java/teetime/stage/InstanceOfFilterTest.java
+++ b/src/test/java/teetime/stage/InstanceOfFilterTest.java
@@ -29,9 +29,9 @@ import java.util.List;
 import org.junit.Before;
 import org.junit.Test;
 
-import teetime.framework.Analysis;
+import teetime.framework.Execution;
 import teetime.framework.ConfigurationContext;
-import teetime.framework.AnalysisException;
+import teetime.framework.ExecutionException;
 import teetime.util.Pair;
 
 /**
@@ -113,10 +113,10 @@ public class InstanceOfFilterTest {
 	@Test
 	public void filterShouldSendToBothOutputPorts() throws Exception {
 		InstanceOfFilterTestConfig config = new InstanceOfFilterTestConfig();
-		Analysis analysis = new Analysis(config);
+		Execution execution = new Execution(config);
 		try {
-			analysis.executeBlocking();
-		} catch (AnalysisException e) {
+			execution.executeBlocking();
+		} catch (ExecutionException e) {
 			Collection<Pair<Thread, Throwable>> thrownExceptions = e.getThrownExceptions();
 			// TODO: handle exception
 		}
-- 
GitLab