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 1146)
+++ 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);
     }
 }
