Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleTest.java	(revision 1402)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleTest.java	(revision 1845)
@@ -174,3 +174,388 @@
     }
 
+    /**
+     *
+     */
+    @Test
+    public void test_TaskDetection_03() throws Exception {
+        String input =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event c {}" +
+            "  Event noise1 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event noise2 {}" +
+            "  Event b {}" +
+            "  Event c {}" +
+            "  Event noise3 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event noise4 {}" +
+            "  Event b {}" +
+            "  Event c {}" +
+            "  Event noise5 {}" +
+            "}";
+
+        String output =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Sequence sequence1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event c {}" +
+            "  Event noise1 {}" +
+            "  Sequence sequence1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event noise2 {}" +
+            "  Sequence sequence2 {" +
+            "    Event b {}" +
+            "    Event c {}" +
+            "  }" +
+            "  Event noise3 {}" +
+            "  Sequence sequence1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event noise4 {}" +
+            "  Sequence sequence2 {" +
+            "    Event b {}" +
+            "    Event c {}" +
+            "  }" +
+            "  Event noise5 {}" +
+            "}";
+
+        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_TaskDetection_04() throws Exception {
+        String input =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event a {}" +
+            "  Event noise1 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event noise2 {}" +
+            "  Event b {}" +
+            "  Event a {}" +
+            "  Event noise3 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event noise4 {}" +
+            "  Event b {}" +
+            "  Event a {}" +
+            "  Event noise5 {}" +
+            "}";
+
+        String output =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Sequence sequence1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event a {}" +
+            "  Event noise1 {}" +
+            "  Sequence sequence1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event noise2 {}" +
+            "  Sequence sequence2 {" +
+            "    Event b {}" +
+            "    Event a {}" +
+            "  }" +
+            "  Event noise3 {}" +
+            "  Sequence sequence1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event noise4 {}" +
+            "  Sequence sequence2 {" +
+            "    Event b {}" +
+            "    Event a {}" +
+            "  }" +
+            "  Event noise5 {}" +
+            "}";
+
+        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_TaskDetection_05() throws Exception {
+        String input =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event a {}" +
+            "  Event noise1 {}" +
+            "  Event b {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event noise2 {}" +
+            "  Event b {}" +
+            "  Event a {}" +
+            "  Event c {}" +
+            "  Event noise2 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event noise3 {}" +
+            "  Event a {}" +
+            "  Event c {}" +
+            "  Event noise4 {}" +
+            "  Event a {}" +
+            "  Event c {}" +
+            "}";
+
+        String output =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Sequence 1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event a {}" +
+            "  Event noise1 {}" +
+            "  Event b {}" +
+            "  Sequence 1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event noise2 {}" +
+            "  Event b {}" +
+            "  Sequence 2 {" +
+            "    Event a {}" +
+            "    Event c {}" +
+            "  }" +
+            "  Event noise2 {}" +
+            "  Sequence 1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event noise3 {}" +
+            "  Sequence 2 {" +
+            "    Event a {}" +
+            "    Event c {}" +
+            "  }" +
+            "  Event noise4 {}" +
+            "  Sequence 2 {" +
+            "    Event a {}" +
+            "    Event c {}" +
+            "  }" +
+            "}";
+
+        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_TaskDetection_06() throws Exception {
+        String input =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event a {}" +
+            "  Event noise1 {}" +
+            "  Event b {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event noise2 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event a {}" +
+            "}";
+
+        String output =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Sequence 1 {" +
+            "    Sequence 2 {" +
+            "      Event a {}" +
+            "      Event b {}" +
+            "    }" +
+            "    Event a {}" +
+            "  }" +
+            "  Event noise1 {}" +
+            "  Event b {}" +
+            "  Sequence 2 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event noise2 {}" +
+            "  Sequence 1 {" +
+            "    Sequence 2 {" +
+            "      Event a {}" +
+            "      Event b {}" +
+            "    }" +
+            "    Event a {}" +
+            "  }" +
+            "}";
+
+        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_TaskDetection_07() throws Exception {
+        String input =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event c {}" +
+            "  Event noise1 {}" +
+            "  Event b {}" +
+            "  Event c {}" +
+            "  Event a {}" +
+            "  Event noise2 {}" +
+            "  Event c {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "}";
+
+        String output =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Event a {}" +
+            "  Sequence 1 {" +
+            "    Event b {}" +
+            "    Event c {}" +
+            "  }" +
+            "  Event noise1 {}" +
+            "  Sequence 1 {" +
+            "    Event b {}" +
+            "    Event c {}" +
+            "  }" +
+            "  Event a {}" +
+            "  Event noise2 {}" +
+            "  Event c {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "}";
+
+        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_TaskDetection_08() throws Exception {
+        String input =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event c {}" +
+            "  Event noise1 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event d {}" +
+            "  Event noise2 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event e {}" +
+            "  Event noise3 {}" +
+            "  Event b {}" +
+            "  Event c {}" +
+            "  Event d {}" +
+            "  Event noise4 {}" +
+            "  Event b {}" +
+            "  Event d {}" +
+            "  Event e {}" +
+            "  Event noise5 {}" +
+            "  Event b {}" +
+            "  Event d {}" +
+            "  Event f {}" +
+            "  Event noise6 {}" +
+            "  Event a {}" +
+            "  Event b {}" +
+            "  Event noise7 {}" +
+            "  Event b {}" +
+            "  Event c {}" +
+            "  Event noise8 {}" +
+            "  Event b {}" +
+            "  Event d {}" +
+            "  Event noise9 {}" +
+            "}";
+
+        String output =
+            "UserSession {" +
+            "  Event noise0 {}" +
+            "  Sequence 1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event c {}" +
+            "  Event noise1 {}" +
+            "  Sequence 1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event d {}" +
+            "  Event noise2 {}" +
+            "  Sequence 1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event e {}" +
+            "  Event noise3 {}" +
+            "  Sequence 2 {" +
+            "    Event b {}" +
+            "    Event c {}" +
+            "  }" +
+            "  Event d {}" +
+            "  Event noise4 {}" +
+            "  Sequence 3 {" +
+            "    Event b {}" +
+            "    Event d {}" +
+            "  }" +
+            "  Event e {}" +
+            "  Event noise5 {}" +
+            "  Sequence 3 {" +
+            "    Event b {}" +
+            "    Event d {}" +
+            "  }" +
+            "  Event f {}" +
+            "  Event noise6 {}" +
+            "  Sequence 1 {" +
+            "    Event a {}" +
+            "    Event b {}" +
+            "  }" +
+            "  Event noise7 {}" +
+            "  Sequence 2 {" +
+            "    Event b {}" +
+            "    Event c {}" +
+            "  }" +
+            "  Event noise8 {}" +
+            "  Sequence 3 {" +
+            "    Event b {}" +
+            "    Event d {}" +
+            "  }" +
+            "  Event noise9 {}" +
+            "}";
+
+        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output);
+    }
 }
