@Test
public void optimize() {

	IterativeComQueue queue = new IterativeComQueue()
		.add(new MyComputeFunction())
		.add(new MyComputeFunction())
		.add(new MyCommunicateFunction())
		.add(new MyCommunicateFunction())
		.add(new MyComputeFunction())
		.add(new MyComputeFunction())
		.add(new MyCommunicateFunction());
	queue.exec();
	Assert.assertTrue(
		queue.toString().matches(
			"\\{\"completeResult\":null,\"maxIter\":2147483647,\"sessionId\":[0-9]*" +
				",\"queue\":\"ChainedComputation,MyCommunicateFunction,MyCommunicateFunction," +
				"ChainedComputation,MyCommunicateFunction\",\"compareCriterion\":null\\}"));
}