Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/AbstractComparisonRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/AbstractComparisonRuleTest.java	(revision 1294)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/AbstractComparisonRuleTest.java	(revision 1294)
@@ -0,0 +1,293 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.tasktrees.taskequality;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.eventcore.IEventTarget;
+import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
+import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
+import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
+
+/**
+ * @author Patrick Harms
+ */
+public class AbstractComparisonRuleTest {
+
+    /** */
+    private ITaskFactory taskFactory = new TaskFactory();
+
+    /** */
+    private ITaskBuilder taskBuilder = new TaskBuilder();
+
+    /**
+     *
+     */
+    protected IEventTask createNewEventTask(IEventType eventType, IEventTarget eventTarget) {
+        IEventTask eventTask = taskFactory.createNewEventTask(eventType + " --> " + eventTarget);
+        taskFactory.createNewTaskInstance(eventTask, new Event(eventType, eventTarget));
+        return eventTask;
+    }
+
+    /**
+     *
+     */
+    protected ISequence createNewSequence() {
+        ISequence sequence = taskFactory.createNewSequence();
+        taskFactory.createNewTaskInstance(sequence);
+        return sequence;
+    }
+
+    /**
+     *
+     */
+    protected ISelection createNewSelection() {
+        ISelection selection = taskFactory.createNewSelection();
+        taskFactory.createNewTaskInstance(selection);
+        return selection;
+    }
+
+    /**
+     *
+     */
+    protected IOptional createNewOptional() {
+        IOptional optional = taskFactory.createNewOptional();
+        taskFactory.createNewTaskInstance(optional);
+        return optional;
+    }
+
+    /**
+     *
+     */
+    protected IIteration createNewIteration() {
+        IIteration iteration = taskFactory.createNewIteration();
+        taskFactory.createNewTaskInstance(iteration);
+        return iteration;
+    }
+    
+    /**
+     *
+     */
+    protected void setMarkedTask(IIteration iteration, ITask task) {
+        taskBuilder.setMarkedTask(iteration, task);
+        taskBuilder.addChild((IIterationInstance) iteration.getInstances().iterator().next(),
+                             task.getInstances().iterator().next());
+    }
+
+    /**
+     *
+     */
+    protected void addChild(ISelection selection, ITask task) {
+        taskBuilder.addChild(selection, task);
+        taskBuilder.setChild((ISelectionInstance) selection.getInstances().iterator().next(),
+                             task.getInstances().iterator().next());
+    }
+
+    /**
+     *
+     */
+    protected void addChild(ISequence sequence, ITask task) {
+        taskBuilder.addChild(sequence, task);
+        taskBuilder.addChild((ISequenceInstance) sequence.getInstances().iterator().next(),
+                             task.getInstances().iterator().next());
+    }
+
+    /**
+     *
+     */
+    protected void assertLexicallyEqual(TaskComparisonRule rule, ITask task1, ITask task2) {
+        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, task2));
+        assertTrue(rule.areLexicallyEqual(task1, task2));
+        assertTrue(rule.areSyntacticallyEqual(task1, task2));
+        assertTrue(rule.areSemanticallyEqual(task1, task2));
+
+        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task2, task1));
+        assertTrue(rule.areLexicallyEqual(task2, task1));
+        assertTrue(rule.areSyntacticallyEqual(task2, task1));
+        assertTrue(rule.areSemanticallyEqual(task2, task1));
+        
+        assertEquals(TaskEquality.LEXICALLY_EQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertTrue(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                          task2.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                             task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.LEXICALLY_EQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertTrue(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                          task1.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                             task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    protected void assertSyntacticallyEqual(TaskComparisonRule rule, ITask task1, ITask task2) {
+        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL, rule.compare(task1, task2));
+        assertFalse(rule.areLexicallyEqual(task1, task2));
+        assertTrue(rule.areSyntacticallyEqual(task1, task2));
+        assertTrue(rule.areSemanticallyEqual(task1, task2));
+
+        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL, rule.compare(task2, task1));
+        assertFalse(rule.areLexicallyEqual(task2, task1));
+        assertTrue(rule.areSyntacticallyEqual(task2, task1));
+        assertTrue(rule.areSemanticallyEqual(task2, task1));
+        
+        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                             task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                             task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    protected void assertSemanticallyEqual(TaskComparisonRule rule, ITask task1, ITask task2) {
+        assertEquals(TaskEquality.SEMANTICALLY_EQUAL, rule.compare(task1, task2));
+        assertFalse(rule.areLexicallyEqual(task1, task2));
+        assertFalse(rule.areSyntacticallyEqual(task1, task2));
+        assertTrue(rule.areSemanticallyEqual(task1, task2));
+
+        assertEquals(TaskEquality.SEMANTICALLY_EQUAL, rule.compare(task2, task1));
+        assertFalse(rule.areLexicallyEqual(task2, task1));
+        assertFalse(rule.areSyntacticallyEqual(task2, task1));
+        assertTrue(rule.areSemanticallyEqual(task2, task1));
+        
+        assertEquals(TaskEquality.SEMANTICALLY_EQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                             task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.SEMANTICALLY_EQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                             task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    protected void assertUnequal(TaskComparisonRule rule, ITask task1, ITask task2) {
+        assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
+        assertFalse(rule.areLexicallyEqual(task1, task2));
+        assertFalse(rule.areSyntacticallyEqual(task1, task2));
+        assertFalse(rule.areSemanticallyEqual(task1, task2));
+
+        assertEquals(TaskEquality.UNEQUAL, rule.compare(task2, task1));
+        assertFalse(rule.areLexicallyEqual(task2, task1));
+        assertFalse(rule.areSyntacticallyEqual(task2, task1));
+        assertFalse(rule.areSemanticallyEqual(task2, task1));
+        
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    protected void assertNullEquality(TaskComparisonRule rule, ITask task1, ITask task2) {
+        assertNull(rule.compare(task1, task2));
+        assertFalse(rule.areLexicallyEqual(task1, task2));
+        assertFalse(rule.areSyntacticallyEqual(task1, task2));
+        assertFalse(rule.areSemanticallyEqual(task1, task2));
+
+        assertNull(rule.compare(task2, task1));
+        assertFalse(rule.areLexicallyEqual(task2, task1));
+        assertFalse(rule.areSyntacticallyEqual(task2, task1));
+        assertFalse(rule.areSemanticallyEqual(task2, task1));
+        
+        assertNull(rule.compare(task1.getInstances().iterator().next(),
+                                task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+
+        assertNull(rule.compare(task2.getInstances().iterator().next(),
+                                task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+    }
+}
Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRuleTest.java	(revision 1190)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRuleTest.java	(revision 1294)
@@ -25,6 +25,4 @@
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -32,5 +30,5 @@
  * @author Patrick Harms
  */
-public class EventTaskComparisonRuleTest {
+public class EventTaskComparisonRuleTest extends AbstractComparisonRuleTest {
 
     /**
@@ -39,11 +37,9 @@
     @Test
     public void test_isApplicable_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         assertTrue(rule.isApplicable(task1, task1));
@@ -55,15 +51,13 @@
     @Test
     public void test_isApplicable_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new StringEventType("eventType2");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -76,13 +70,11 @@
     @Test
     public void test_isApplicable_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
        
-        ITask selection = taskFactory.createNewSelection();
+        ITask selection = createNewSelection();
 
         assertFalse(rule.isApplicable(task1, selection));
@@ -95,13 +87,11 @@
     @Test
     public void test_isApplicable_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask sequence = taskFactory.createNewSequence();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask sequence = createNewSequence();
 
         assertFalse(rule.isApplicable(task1, sequence));
@@ -114,13 +104,11 @@
     @Test
     public void test_isApplicable_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask iteration = taskFactory.createNewIteration();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask iteration = createNewIteration();
 
         assertFalse(rule.isApplicable(task1, iteration));
@@ -133,13 +121,11 @@
     @Test
     public void test_isApplicable_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask optional = taskFactory.createNewOptional();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask optional = createNewOptional();
 
         assertFalse(rule.isApplicable(task1, optional));
@@ -151,12 +137,122 @@
      */
     @Test
+    public void test_isApplicable_07() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+   
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_08() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_09() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask selection = createNewSelection();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      selection.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(selection.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_10() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask sequence = createNewSequence();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      sequence.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(sequence.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_11() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask iteration = createNewIteration();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      iteration.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(iteration.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_12() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask optional = createNewOptional();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      optional.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(optional.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
     public void test_compare_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, task1));
@@ -171,13 +267,11 @@
     @Test
     public void test_compare_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        ITask task2 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
         
         assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, task2));
@@ -197,14 +291,12 @@
     @Test
     public void test_compare_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new StringEventType("eventType2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
 
         assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
@@ -224,14 +316,12 @@
     @Test
     public void test_compare_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType1, eventTarget2);
+        ITask task2 = createNewEventTask(eventType1, eventTarget2);
         
         assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
@@ -252,15 +342,13 @@
     @Test
     public void test_compare_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new StringEventType("eventType2");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
         
         assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
@@ -275,3 +363,167 @@
     }
 
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_06() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertEquals(TaskEquality.LEXICALLY_EQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertTrue(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                          task1.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                             task1.getInstances().iterator().next()));
+    }
+    
+    /**
+     *
+     */
+    @Test
+    public void test_compare_07() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertEquals(TaskEquality.LEXICALLY_EQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertTrue(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                          task2.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                             task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.LEXICALLY_EQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertTrue(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                          task1.getInstances().iterator().next()));
+        assertTrue(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+        assertTrue(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                             task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_08() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IEventType eventType2 = new StringEventType("eventType2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_09() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType1, eventTarget2);
+        
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+    }
+
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_10() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task1.getInstances().iterator().next(),
+                                  task2.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task1.getInstances().iterator().next(),
+                                           task2.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task1.getInstances().iterator().next(),
+                                               task2.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task1.getInstances().iterator().next(),
+                                              task2.getInstances().iterator().next()));
+
+        assertEquals(TaskEquality.UNEQUAL,
+                     rule.compare(task2.getInstances().iterator().next(),
+                                  task1.getInstances().iterator().next()));
+        assertFalse(rule.areLexicallyEqual(task2.getInstances().iterator().next(),
+                                           task1.getInstances().iterator().next()));
+        assertFalse(rule.areSyntacticallyEqual(task2.getInstances().iterator().next(),
+                                               task1.getInstances().iterator().next()));
+        assertFalse(rule.areSemanticallyEqual(task2.getInstances().iterator().next(),
+                                              task1.getInstances().iterator().next()));
+    }
+
 }
Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRuleTest.java	(revision 1190)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRuleTest.java	(revision 1294)
@@ -42,9 +42,5 @@
 import de.ugoe.cs.autoquest.keyboardmaps.VirtualKey;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.EventTaskComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.GUIEventTaskComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -52,5 +48,5 @@
  * @author Patrick Harms
  */
-public class GUIEventTaskComparisonRuleTest {
+public class GUIEventTaskComparisonRuleTest extends AbstractComparisonRuleTest {
 
     /**
@@ -59,11 +55,9 @@
     @Test
     public void test_isApplicable_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         assertTrue(rule.isApplicable(task1, task1));
@@ -75,15 +69,13 @@
     @Test
     public void test_isApplicable_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new StringEventType("eventType2");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -96,15 +88,13 @@
     @Test
     public void test_isApplicable_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new KeyboardFocusChange();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new KeyboardFocusChange();
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -117,15 +107,13 @@
     @Test
     public void test_isApplicable_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new KeyReleased(VirtualKey.LETTER_B);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -138,15 +126,13 @@
     @Test
     public void test_isApplicable_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_C);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new KeyTyped(VirtualKey.LETTER_D);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -159,15 +145,13 @@
     @Test
     public void test_isApplicable_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 5, 6);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.MIDDLE, 3, 1);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -180,15 +164,13 @@
     @Test
     public void test_isApplicable_07() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.RIGHT, 4, 7);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.X, 9, 12);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -201,15 +183,13 @@
     @Test
     public void test_isApplicable_08() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new MouseDragAndDrop(5, 6, 7, 8);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -222,15 +202,13 @@
     @Test
     public void test_isApplicable_09() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new Scroll(3, 4);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -243,6 +221,4 @@
     @Test
     public void test_isApplicable_10() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
@@ -250,9 +226,9 @@
         IEventType eventType1 = new TextInput("text1", inputEvents);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new TextInput("text2", inputEvents);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -265,15 +241,13 @@
     @Test
     public void test_isApplicable_11() {
-        ITaskFactory taskFactory = new TaskFactory();
-
         EventTaskComparisonRule rule = new EventTaskComparisonRule();
 
         IEventType eventType1 = new TextSelection();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new ValueSelection<String>("value");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -286,13 +260,11 @@
     @Test
     public void test_isApplicable_12() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask selection = taskFactory.createNewSelection();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask selection = createNewSelection();
 
         assertFalse(rule.isApplicable(task1, selection));
@@ -305,13 +277,11 @@
     @Test
     public void test_isApplicable_13() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask sequence = taskFactory.createNewSequence();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask sequence = createNewSequence();
 
         assertFalse(rule.isApplicable(task1, sequence));
@@ -324,13 +294,11 @@
     @Test
     public void test_isApplicable_14() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask iteration = taskFactory.createNewIteration();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask iteration = createNewIteration();
 
         assertFalse(rule.isApplicable(task1, iteration));
@@ -343,13 +311,11 @@
     @Test
     public void test_isApplicable_15() {
-        ITaskFactory taskFactory = new TaskFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITask optional = taskFactory.createNewOptional();
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask optional = createNewOptional();
 
         assertFalse(rule.isApplicable(task1, optional));
@@ -357,4 +323,305 @@
     }
 
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_16() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_17() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_18() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new KeyboardFocusChange();
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new KeyboardFocusChange();
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_19() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new KeyReleased(VirtualKey.LETTER_B);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_20() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_C);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new KeyTyped(VirtualKey.LETTER_D);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_21() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 5, 6);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.MIDDLE, 3, 1);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_22() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.RIGHT, 4, 7);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.X, 9, 12);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_23() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new MouseDragAndDrop(5, 6, 7, 8);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_24() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new Scroll(1, 2);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new Scroll(3, 4);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_25() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        List<Event> inputEvents = new ArrayList<Event>();
+        IEventType eventType1 = new TextInput("text1", inputEvents);
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new TextInput("text2", inputEvents);
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(), task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(), task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_26() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new TextSelection();
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        IEventType eventType2 = new ValueSelection<String>("value");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+
+        assertTrue(rule.isApplicable(task1.getInstances().iterator().next(),
+                                     task2.getInstances().iterator().next()));
+        assertTrue(rule.isApplicable(task2.getInstances().iterator().next(),
+                                     task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_27() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask selection = createNewSelection();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      selection.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(selection.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_28() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask sequence = createNewSequence();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      sequence.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(sequence.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_29() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask iteration = createNewIteration();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      iteration.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(iteration.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_30() {
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+
+        ITask optional = createNewOptional();
+
+        assertFalse(rule.isApplicable(task1.getInstances().iterator().next(),
+                                      optional.getInstances().iterator().next()));
+        assertFalse(rule.isApplicable(optional.getInstances().iterator().next(),
+                                      task1.getInstances().iterator().next()));
+    }
+
     /**
      *
@@ -362,11 +629,9 @@
     @Test
     public void test_compare_KeyboardFocusChange_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyboardFocusChange();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -376,14 +641,12 @@
     @Test
     public void test_compare_KeyboardFocusChange_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyboardFocusChange();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new KeyboardFocusChange();
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -393,15 +656,13 @@
     @Test
     public void test_compare_KeyboardFocusChange_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyboardFocusChange();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new KeyboardFocusChange();
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -411,11 +672,9 @@
     @Test
     public void test_compare_KeyPressed_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -425,14 +684,12 @@
     @Test
     public void test_compare_KeyPressed_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyPressed(VirtualKey.LETTER_A);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -442,14 +699,12 @@
     @Test
     public void test_compare_KeyPressed_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyPressed(VirtualKey.LETTER_B);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -459,15 +714,13 @@
     @Test
     public void test_compare_KeyPressed_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyPressed(VirtualKey.LETTER_A);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -477,11 +730,9 @@
     @Test
     public void test_compare_KeyReleased_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyReleased(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -491,14 +742,12 @@
     @Test
     public void test_compare_KeyReleased_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyReleased(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyReleased(VirtualKey.LETTER_A);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -508,14 +757,12 @@
     @Test
     public void test_compare_KeyReleased_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyReleased(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyReleased(VirtualKey.LETTER_B);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -525,15 +772,13 @@
     @Test
     public void test_compare_KeyReleased_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyReleased(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyReleased(VirtualKey.LETTER_A);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -543,11 +788,9 @@
     @Test
     public void test_compare_KeyTyped_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -557,14 +800,12 @@
     @Test
     public void test_compare_KeyTyped_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyTyped(VirtualKey.LETTER_A);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -574,14 +815,12 @@
     @Test
     public void test_compare_KeyTyped_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyTyped(VirtualKey.LETTER_B);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -591,15 +830,13 @@
     @Test
     public void test_compare_KeyTyped_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new KeyTyped(VirtualKey.LETTER_A);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new KeyTyped(VirtualKey.LETTER_A);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -609,11 +846,9 @@
     @Test
     public void test_compare_MouseButtonDown_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -623,14 +858,12 @@
     @Test
     public void test_compare_MouseButtonDown_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -640,14 +873,12 @@
     @Test
     public void test_compare_MouseButtonDown_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 3);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -657,14 +888,12 @@
     @Test
     public void test_compare_MouseButtonDown_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 3, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -674,14 +903,12 @@
     @Test
     public void test_compare_MouseButtonDown_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonDown(MouseButtonInteraction.Button.RIGHT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -691,15 +918,13 @@
     @Test
     public void test_compare_MouseButtonDown_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonDown(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -709,11 +934,9 @@
     @Test
     public void test_compare_MouseButtonUp_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -723,14 +946,12 @@
     @Test
     public void test_compare_MouseButtonUp_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -740,14 +961,12 @@
     @Test
     public void test_compare_MouseButtonUp_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 3);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -757,14 +976,12 @@
     @Test
     public void test_compare_MouseButtonUp_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 3, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -774,14 +991,12 @@
     @Test
     public void test_compare_MouseButtonUp_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.RIGHT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -791,15 +1006,13 @@
     @Test
     public void test_compare_MouseButtonUp_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseButtonUp(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -809,11 +1022,9 @@
     @Test
     public void test_compare_MouseClick_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -823,14 +1034,12 @@
     @Test
     public void test_compare_MouseClick_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -840,14 +1049,12 @@
     @Test
     public void test_compare_MouseClick_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 3);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -857,14 +1064,12 @@
     @Test
     public void test_compare_MouseClick_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseClick(MouseButtonInteraction.Button.LEFT, 3, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -874,14 +1079,12 @@
     @Test
     public void test_compare_MouseClick_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseClick(MouseButtonInteraction.Button.RIGHT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -891,15 +1094,13 @@
     @Test
     public void test_compare_MouseClick_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -909,11 +1110,9 @@
     @Test
     public void test_compare_MouseDoubleClick_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -923,14 +1122,12 @@
     @Test
     public void test_compare_MouseDoubleClick_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -940,14 +1137,12 @@
     @Test
     public void test_compare_MouseDoubleClick_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 3);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -957,14 +1152,12 @@
     @Test
     public void test_compare_MouseDoubleClick_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 3, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -974,14 +1167,12 @@
     @Test
     public void test_compare_MouseDoubleClick_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.RIGHT, 1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -991,15 +1182,13 @@
     @Test
     public void test_compare_MouseDoubleClick_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDoubleClick(MouseButtonInteraction.Button.LEFT, 1, 2);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -1009,11 +1198,9 @@
     @Test
     public void test_compare_MouseDragAndDrop_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -1023,14 +1210,12 @@
     @Test
     public void test_compare_MouseDragAndDrop_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(1, 2, 3, 4);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1040,14 +1225,12 @@
     @Test
     public void test_compare_MouseDragAndDrop_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(5, 2, 3, 4);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1057,14 +1240,12 @@
     @Test
     public void test_compare_MouseDragAndDrop_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(1, 5, 3, 4);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1074,14 +1255,12 @@
     @Test
     public void test_compare_MouseDragAndDrop_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(1, 2, 5, 4);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1091,14 +1270,12 @@
     @Test
     public void test_compare_MouseDragAndDrop_06() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(1, 2, 3, 5);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1108,15 +1285,13 @@
     @Test
     public void test_compare_MouseDragAndDrop_07() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new MouseDragAndDrop(1, 2, 3, 4);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1126,11 +1301,9 @@
     @Test
     public void test_compare_Scroll_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -1140,14 +1313,12 @@
     @Test
     public void test_compare_Scroll_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new Scroll(1, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1157,14 +1328,12 @@
     @Test
     public void test_compare_Scroll_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new Scroll(3, 2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1174,14 +1343,12 @@
     @Test
     public void test_compare_Scroll_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new Scroll(1, 3);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1191,15 +1358,13 @@
     @Test
     public void test_compare_Scroll_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new Scroll(1, 2);
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new Scroll(1, 2);
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -1209,6 +1374,4 @@
     @Test
     public void test_compare_TextInput_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new StringEventType("eventType1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
@@ -1216,7 +1379,7 @@
         textInputEvents1.add(new Event(eventType1, eventTarget1));
         eventType1 = new TextInput("enteredText1", textInputEvents1);
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
     
@@ -1226,6 +1389,4 @@
     @Test
     public void test_compare_TextInput_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new StringEventType("eventType1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
@@ -1233,10 +1394,10 @@
         textInputEvents1.add(new Event(eventType1, eventTarget1));
         eventType1 = new TextInput("enteredText1", textInputEvents1);
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new TextInput("enteredText1", textInputEvents1);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -1246,6 +1407,4 @@
     @Test
     public void test_compare_TextInput_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new StringEventType("eventType1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
@@ -1253,5 +1412,5 @@
         textInputEvents1.add(new Event(eventType1, eventTarget1));
         eventType1 = new TextInput("enteredText1", textInputEvents1);
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new StringEventType("eventType2");
@@ -1259,7 +1418,7 @@
         textInputEvents2.add(new Event(eventType2, eventTarget1));
         eventType2 = new TextInput("enteredText1", textInputEvents2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-
-        assertSyntacticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+
+        assertSyntacticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -1269,6 +1428,4 @@
     @Test
     public void test_compare_TextInput_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new StringEventType("eventType1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
@@ -1276,5 +1433,5 @@
         textInputEvents1.add(new Event(eventType1, eventTarget1));
         eventType1 = new TextInput("enteredText1", textInputEvents1);
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new StringEventType("eventType2");
@@ -1282,7 +1439,7 @@
         textInputEvents2.add(new Event(eventType2, eventTarget1));
         eventType2 = new TextInput("enteredText2", textInputEvents2);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
     
@@ -1292,6 +1449,4 @@
     @Test
     public void test_compare_TextInput_05() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new StringEventType("eventType1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
@@ -1299,10 +1454,10 @@
         textInputEvents1.add(new Event(eventType1, eventTarget1));
         eventType1 = new TextInput("enteredText1", textInputEvents1);
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType1, eventTarget2);
-
-        assertUnequal(task1, task2);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+        ITask task2 = createNewEventTask(eventType1, eventTarget2);
+
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1312,11 +1467,9 @@
     @Test
     public void test_compare_TextSelection_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new TextSelection();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -1326,14 +1479,12 @@
     @Test
     public void test_compare_TextSelection_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new TextSelection();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new TextSelection();
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1343,15 +1494,13 @@
     @Test
     public void test_compare_TextSelection_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new TextSelection();
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new TextSelection();
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1361,11 +1510,9 @@
     @Test
     public void test_compare_ValueSelection_01() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new ValueSelection<String>("value1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertLexicallyEqual(task1, task1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task1);
     }
 
@@ -1375,14 +1522,12 @@
     @Test
     public void test_compare_ValueSelection_02() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new ValueSelection<String>("value1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new ValueSelection<String>("value1");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertLexicallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertLexicallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1392,14 +1537,12 @@
     @Test
     public void test_compare_ValueSelection_03() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new ValueSelection<String>("value1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new ValueSelection<String>("value2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
-        
-        assertSemanticallyEqual(task1, task2);
+        ITask task2 = createNewEventTask(eventType2, eventTarget1);
+        
+        assertSemanticallyEqual(new GUIEventTaskComparisonRule(), task1, task2);
     }
 
@@ -1409,83 +1552,13 @@
     @Test
     public void test_compare_ValueSelection_04() {
-        ITaskFactory taskFactory = new TaskFactory();
-        
         IEventType eventType1 = new ValueSelection<String>("value1");
         IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new ValueSelection<String>("value1");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertUnequal(task1, task2);
-    }
-    
-    /**
-     *
-     */
-    private void assertLexicallyEqual(ITask task1, ITask task2) {
-        GUIEventTaskComparisonRule rule = new GUIEventTaskComparisonRule();
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, task2));
-        assertTrue(rule.areLexicallyEqual(task1, task2));
-        assertTrue(rule.areSyntacticallyEqual(task1, task2));
-        assertTrue(rule.areSemanticallyEqual(task1, task2));
-
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task2, task1));
-        assertTrue(rule.areLexicallyEqual(task2, task1));
-        assertTrue(rule.areSyntacticallyEqual(task2, task1));
-        assertTrue(rule.areSemanticallyEqual(task2, task1));
-    }
-
-    /**
-     *
-     */
-    private void assertSyntacticallyEqual(ITask task1, ITask task2) {
-        GUIEventTaskComparisonRule rule = new GUIEventTaskComparisonRule();
-        
-        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL, rule.compare(task1, task2));
-        assertFalse(rule.areLexicallyEqual(task1, task2));
-        assertTrue(rule.areSyntacticallyEqual(task1, task2));
-        assertTrue(rule.areSemanticallyEqual(task1, task2));
-
-        assertEquals(TaskEquality.SYNTACTICALLY_EQUAL, rule.compare(task2, task1));
-        assertFalse(rule.areLexicallyEqual(task2, task1));
-        assertTrue(rule.areSyntacticallyEqual(task2, task1));
-        assertTrue(rule.areSemanticallyEqual(task2, task1));
-    }
-
-    /**
-     *
-     */
-    private void assertSemanticallyEqual(ITask task1, ITask task2) {
-        GUIEventTaskComparisonRule rule = new GUIEventTaskComparisonRule();
-        
-        assertEquals(TaskEquality.SEMANTICALLY_EQUAL, rule.compare(task1, task2));
-        assertFalse(rule.areLexicallyEqual(task1, task2));
-        assertFalse(rule.areSyntacticallyEqual(task1, task2));
-        assertTrue(rule.areSemanticallyEqual(task1, task2));
-
-        assertEquals(TaskEquality.SEMANTICALLY_EQUAL, rule.compare(task2, task1));
-        assertFalse(rule.areLexicallyEqual(task2, task1));
-        assertFalse(rule.areSyntacticallyEqual(task2, task1));
-        assertTrue(rule.areSemanticallyEqual(task2, task1));
-    }
-
-    /**
-     *
-     */
-    private void assertUnequal(ITask task1, ITask task2) {
-        GUIEventTaskComparisonRule rule = new GUIEventTaskComparisonRule();
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
-        assertFalse(rule.areLexicallyEqual(task1, task2));
-        assertFalse(rule.areSyntacticallyEqual(task1, task2));
-        assertFalse(rule.areSemanticallyEqual(task1, task2));
-
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(task2, task1));
-        assertFalse(rule.areLexicallyEqual(task2, task1));
-        assertFalse(rule.areSyntacticallyEqual(task2, task1));
-        assertFalse(rule.areSemanticallyEqual(task2, task1));
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        assertUnequal(new GUIEventTaskComparisonRule(), task1, task2);
     }
 }
Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRuleTest.java	(revision 1190)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRuleTest.java	(revision 1294)
@@ -23,12 +23,7 @@
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.IterationComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -36,14 +31,162 @@
  * @author Patrick Harms
  */
-public class IterationComparisonRuleTest {
-
-    /**
-     *
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
+public class IterationComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        ITask task1 = createNewIteration();
+        
+        assertTrue(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewIteration();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewSequence();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_01() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IIteration iteration1 = createNewIteration();
+        
+        assertLexicallyEqual(rule, iteration1, iteration1);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_02() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        assertLexicallyEqual(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_03() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        setMarkedTask(iteration1, task1);
+        
+        assertUnequal(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_04() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        setMarkedTask(iteration1, task1);
+        setMarkedTask(iteration2, task1);
+        
+        assertLexicallyEqual(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_05() {
         IterationComparisonRule rule = new IterationComparisonRule();
         
@@ -54,60 +197,95 @@
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
 
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertFalse(rule.isApplicable(task1, task2));
-        
-        IIteration iteration1 = taskFactory.createNewIteration();
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration1));
-
-        IIteration iteration2 = taskFactory.createNewIteration();
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration2, iteration1));
-        
-        treeBuilder.setMarkedTask(iteration1, task1);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(iteration2, iteration1));
-        
-        treeBuilder.setMarkedTask(iteration2, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration2, iteration1));
-        
-        treeBuilder.setMarkedTask(iteration1, task2);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(iteration2, iteration1));
-        
-        treeBuilder.setMarkedTask(iteration2, task2);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration2, iteration1));
-        
-        ISelection selection1 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection1, task2);
-        treeBuilder.setMarkedTask(iteration1, selection1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration2, iteration1));
-        
-        ISelection selection2 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection2, task2);
-        treeBuilder.setMarkedTask(iteration2, selection2);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, iteration2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration2, iteration1));
-        
-        assertFalse(rule.isApplicable(iteration1, selection1));
-        assertFalse(rule.isApplicable(selection1, iteration1));
-        assertFalse(rule.isApplicable(iteration2, selection1));
-        assertFalse(rule.isApplicable(selection1, iteration2));
-
-        assertFalse(rule.isApplicable(iteration1, selection2));
-        assertFalse(rule.isApplicable(selection2, iteration1));
-        assertFalse(rule.isApplicable(iteration2, selection2));
-        assertFalse(rule.isApplicable(selection2, iteration2));
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        setMarkedTask(iteration1, task1);
+        setMarkedTask(iteration1, task2);
+        
+        assertUnequal(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_06() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        setMarkedTask(iteration1, selection1);
+        
+        setMarkedTask(iteration2, task1);
+        
+        assertLexicallyEqual(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_07() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        setMarkedTask(iteration1, selection1);
+        
+        ISelection selection2 = createNewSelection();
+        addChild(selection2, task1);
+        setMarkedTask(iteration2, selection2);
+        
+        assertLexicallyEqual(rule, iteration1, iteration2);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_08() {
+        IterationComparisonRule rule = new IterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        IIteration iteration1 = createNewIteration();
+        IIteration iteration2 = createNewIteration();
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        addChild(selection1, task2);
+        setMarkedTask(iteration1, selection1);
+
+        ISelection selection2 = createNewSelection();
+        addChild(selection2, task2);
+        setMarkedTask(iteration2, selection2);
+        
+        assertLexicallyEqual(rule, iteration1, iteration2);
     }
 
Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRuleTest.java	(revision 1190)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRuleTest.java	(revision 1294)
@@ -22,13 +22,7 @@
 import de.ugoe.cs.autoquest.eventcore.IEventType;
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.SelectionComparisonRule;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -36,14 +30,161 @@
  * @author Patrick Harms
  */
-public class SelectionComparisonRuleTest {
-
-    /**
-     * 
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
+public class SelectionComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        ITask task1 = createNewSelection();
+        
+        assertTrue(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewSelection();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewSequence();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_01() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        ISelection selection1 = createNewSelection();
+        assertLexicallyEqual(rule, selection1, selection1);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_02() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        ISelection selection1 = createNewSelection();
+        ISelection selection2 = createNewSelection();
+        
+        assertLexicallyEqual(rule, selection1, selection2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_03() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISelection selection1 = createNewSelection();
+        ISelection selection2 = createNewSelection();
+        
+        addChild(selection1, task1);
+        
+        assertUnequal(rule, selection1, selection2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_04() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISelection selection1 = createNewSelection();
+        ISelection selection2 = createNewSelection();
+        
+        addChild(selection1, task1);
+        addChild(selection2, task1);
+        
+        assertLexicallyEqual(rule, selection1, selection2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_05() {
         SelectionComparisonRule rule = new SelectionComparisonRule();
         
@@ -54,54 +195,44 @@
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
 
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertFalse(rule.isApplicable(task1, task2));
-        
-        ISelection selection1 = taskFactory.createNewSelection();
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, selection1));
-
-        ISelection selection2 = taskFactory.createNewSelection();
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, selection2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection2, selection1));
-        
-        treeBuilder.addChild(selection1, task1);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(selection1, selection2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(selection2, selection1));
-        
-        treeBuilder.addChild(selection2, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, selection2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection2, selection1));
-        
-        treeBuilder.addChild(selection1, task2);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(selection1, selection2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(selection2, selection1));
-        
-        treeBuilder.addChild(selection2, task2);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, selection2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection2, selection1));
-        
-        ISelection selection3 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection3, task2);
-        treeBuilder.addChild(selection3, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, selection3));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection3, selection1));
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection2, selection3));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection3, selection2));
-
-        ISequence sequence = taskFactory.createNewSequence();
-        assertFalse(rule.isApplicable(selection1, sequence));
-        assertFalse(rule.isApplicable(sequence, selection1));
-        assertFalse(rule.isApplicable(selection2, sequence));
-        assertFalse(rule.isApplicable(sequence, selection2));
-        assertFalse(rule.isApplicable(selection3, sequence));
-        assertFalse(rule.isApplicable(sequence, selection3));
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        ISelection selection1 = createNewSelection();
+        ISelection selection2 = createNewSelection();
+        
+        addChild(selection1, task1);
+        addChild(selection2, task2);
+        
+        assertUnequal(rule, selection1, selection2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_06() {
+        SelectionComparisonRule rule = new SelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        ISelection selection1 = createNewSelection();
+        ISelection selection2 = createNewSelection();
+        
+        addChild(selection1, task1);
+        addChild(selection2, task2);
+        
+        ISelection selection3 = createNewSelection();
+        addChild(selection3, task1);
+        assertLexicallyEqual(rule, selection1, selection3);
+        
+        addChild(selection3, task2);
+        assertLexicallyEqual(rule, selection2, selection3);
     }
 
Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRuleTest.java	(revision 1190)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRuleTest.java	(revision 1294)
@@ -22,13 +22,7 @@
 import de.ugoe.cs.autoquest.eventcore.IEventType;
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.SequenceComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -36,14 +30,161 @@
  * @author Patrick Harms
  */
-public class SequenceComparisonRuleTest {
-
-    /**
-     * 
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
+public class SequenceComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        ITask task1 = createNewSequence();
+        
+        assertTrue(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewSequence();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_01() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        ISequence sequence1 = createNewSequence();
+        assertLexicallyEqual(rule, sequence1, sequence1);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_02() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        assertLexicallyEqual(rule, sequence1, sequence2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_03() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        addChild(sequence1, task1);
+        
+        assertUnequal(rule, sequence1, sequence2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_04() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        addChild(sequence1, task1);
+        addChild(sequence2, task1);
+        
+        assertLexicallyEqual(rule, sequence1, sequence2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_05() {
         SequenceComparisonRule rule = new SequenceComparisonRule();
         
@@ -54,53 +195,72 @@
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
 
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertFalse(rule.isApplicable(task1, task2));
-        
-        ISequence sequence1 = taskFactory.createNewSequence();
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence1, sequence1));
-
-        ISequence sequence2 = taskFactory.createNewSequence();
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence1, sequence2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence2, sequence1));
-        
-        treeBuilder.addChild(sequence1, task1);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence1, sequence2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence2, sequence1));
-        
-        treeBuilder.addChild(sequence2, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence1, sequence2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence2, sequence1));
-        
-        treeBuilder.addChild(sequence1, task2);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence1, sequence2));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence2, sequence1));
-        
-        treeBuilder.addChild(sequence2, task2);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence1, sequence2));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(sequence2, sequence1));
-        
-        ISequence sequence3 = taskFactory.createNewSequence();
-        treeBuilder.addChild(sequence3, task2);
-        treeBuilder.addChild(sequence3, task1);
-        
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence1, sequence3));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence3, sequence1));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence2, sequence3));
-        assertEquals(TaskEquality.UNEQUAL, rule.compare(sequence3, sequence2));
-
-        ISelection selection = taskFactory.createNewSelection();
-        assertFalse(rule.isApplicable(sequence1, selection));
-        assertFalse(rule.isApplicable(selection, sequence1));
-        assertFalse(rule.isApplicable(sequence2, selection));
-        assertFalse(rule.isApplicable(selection, sequence2));
-        assertFalse(rule.isApplicable(sequence3, selection));
-        assertFalse(rule.isApplicable(selection, sequence3));
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        addChild(sequence1, task1);
+        addChild(sequence2, task1);
+        
+        addChild(sequence1, task2);
+        
+        assertUnequal(rule, sequence1, sequence2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_06() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        addChild(sequence1, task1);
+        addChild(sequence2, task1);
+        
+        addChild(sequence1, task2);
+        addChild(sequence2, task2);
+        
+        assertLexicallyEqual(rule, sequence1, sequence2);
+    }
+
+    /**
+     * 
+     */
+    @Test
+    public void test_compare_07() {
+        SequenceComparisonRule rule = new SequenceComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        IEventType eventType2 = new StringEventType("eventType2");
+        IEventTarget eventTarget2 = new DummyGUIElement("elem2");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        ITask task2 = createNewEventTask(eventType2, eventTarget2);
+        
+        ISequence sequence1 = createNewSequence();
+        ISequence sequence2 = createNewSequence();
+        
+        addChild(sequence1, task1);
+        addChild(sequence1, task2);
+        
+        addChild(sequence2, task2);
+        addChild(sequence2, task1);
+        
+        assertUnequal(rule, sequence1, sequence2);
     }
 
Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRuleTest.java	(revision 1190)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRuleTest.java	(revision 1294)
@@ -23,12 +23,7 @@
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskAndIterationComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -36,38 +31,258 @@
  * @author Patrick Harms
  */
-public class TaskAndIterationComparisonRuleTest {
-
-    /**
-     *
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
-        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertNull(rule.compare(task1, task1));
-        
-        IIteration iteration1 = taskFactory.createNewIteration();
-        assertNull(rule.compare(iteration1, iteration1));
-        assertNull(rule.compare(task1, iteration1));
-        assertNull(rule.compare(iteration1, task1));
-
-        treeBuilder.setMarkedTask(iteration1, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, task1));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, iteration1));
-        
-        ISelection selection1 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection1, task1);
-        treeBuilder.setMarkedTask(iteration1, selection1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, task1));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, iteration1));
+public class TaskAndIterationComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewSequence();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewSequence();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_07() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewSelection();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_08() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewOptional();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_09() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_10() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_11() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_12() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSequence();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_13() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_14() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSelection();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_01() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        
+        assertNullEquality(rule, iteration1, task1);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_02() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        setMarkedTask(iteration1, task1);
+        
+        assertLexicallyEqual(rule, task1, iteration1);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_03() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        setMarkedTask(iteration1, selection1);
+        
+        assertLexicallyEqual(rule, task1, iteration1);
     }
 
Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRuleTest.java	(revision 1190)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRuleTest.java	(revision 1294)
@@ -23,11 +23,6 @@
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskAndSelectionComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -35,39 +30,238 @@
  * @author Patrick Harms
  */
-public class TaskAndSelectionComparisonRuleTest {
-
-    /**
-     *
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
-        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertNull(rule.compare(task1, task1));
-        
-        ISelection selection1 = taskFactory.createNewSelection();
-        assertNull(rule.compare(selection1, selection1));
-        assertNull(rule.compare(task1, selection1));
-        assertNull(rule.compare(selection1, task1));
-
-        treeBuilder.addChild(selection1, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, task1));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, selection1));
-        
-        selection1 = taskFactory.createNewSelection();
-        ISelection selection2 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection2, task1);
-        treeBuilder.addChild(selection1, selection2);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(selection1, task1));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, selection1));
+public class TaskAndSelectionComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        ITask task1 = createNewSequence();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        ITask task1 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        ITask task1 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        ITask task1 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewSequence();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_07() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewIteration();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_08() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewOptional();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_09() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSelection();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_10() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_11() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_12() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewSequence();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_13() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_14() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+
+        ITask task1 = createNewIteration();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_01() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISelection selection1 = createNewSelection();
+        
+        assertNullEquality(rule, task1, selection1);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_02() {
+        TaskAndSelectionComparisonRule rule = new TaskAndSelectionComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        
+        assertLexicallyEqual(rule, task1, selection1);
     }
 
