Index: /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/AllTests.java
===================================================================
--- /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/AllTests.java	(revision 361)
+++ /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/AllTests.java	(revision 362)
@@ -10,4 +10,5 @@
 
 import de.uni_hildesheim.sse.trans.convert.DisjunctionCheckerTest;
+import de.uni_hildesheim.sse.trans.convert.LiteralFinderTest;
 import de.uni_hildesheim.sse.trans.convert.MaxTermConverter2Test;
 import de.uni_hildesheim.sse.trans.convert.MaxTermConverterTest;
@@ -31,5 +32,6 @@
     MaxTermConverterTest.class,
     MaxTermConverter2Test.class,
-    DimacsWriterTest.class
+    DimacsWriterTest.class,
+    LiteralFinderTest.class
 })
 public class AllTests {
Index: /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/DisjunctionCheckerTest.java
===================================================================
--- /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/DisjunctionCheckerTest.java	(revision 361)
+++ /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/DisjunctionCheckerTest.java	(revision 362)
@@ -15,5 +15,5 @@
 /**
  * Tests the {@link DisjunctionChecker}.
- * @author Elscha
+ * @author El-Sharkawy
  *
  */
@@ -22,7 +22,9 @@
     /**
      * Test whether a disjunction term will be classified correctly.
+     * @throws CSTSemanticException Must not occur, otherwise there is an error inside the Model:
+     * {@link Constraint#setConsSyntax(de.uni_hildesheim.sse.model.cst.ConstraintSyntaxTree)}
      */
     @Test
-    public void testDisjunctionTerm() {
+    public void testDisjunctionTerm() throws CSTSemanticException {
         DecisionVariableDeclaration declA = new DecisionVariableDeclaration("a", BooleanType.TYPE, null);
         DecisionVariableDeclaration declB = new DecisionVariableDeclaration("b", BooleanType.TYPE, null);
@@ -37,12 +39,7 @@
         
         Constraint constraint = new Constraint(null);
-        try {
-            constraint.setConsSyntax(completeTerm);
-        } catch (CSTSemanticException e) {
-            Assert.fail(e.getMessage());
-        }
-        
+        constraint.setConsSyntax(completeTerm);
+
         DisjunctionChecker checker = new DisjunctionChecker(constraint);
-        
         Assert.assertTrue(checker.isDisjunctionTerm());
     }
@@ -50,7 +47,9 @@
     /**
      * Test whether a term, which is not a disjunction term, will be classified correctly.
+     * @throws CSTSemanticException Must not occur, otherwise there is an error inside the Model:
+     * {@link Constraint#setConsSyntax(de.uni_hildesheim.sse.model.cst.ConstraintSyntaxTree)}
      */
     @Test
-    public void testNotDisjunctionTerm() {
+    public void testNotDisjunctionTerm() throws CSTSemanticException {
         DecisionVariableDeclaration declA = new DecisionVariableDeclaration("a", BooleanType.TYPE, null);
         DecisionVariableDeclaration declB = new DecisionVariableDeclaration("b", BooleanType.TYPE, null);
@@ -65,9 +64,5 @@
         
         Constraint constraint = new Constraint(null);
-        try {
-            constraint.setConsSyntax(completeTerm);
-        } catch (CSTSemanticException e) {
-            Assert.fail(e.getMessage());
-        }
+        constraint.setConsSyntax(completeTerm);
         
         DisjunctionChecker checker = new DisjunctionChecker(constraint);
Index: /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/LiteralFinderTest.java
===================================================================
--- /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/LiteralFinderTest.java	(revision 362)
+++ /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/LiteralFinderTest.java	(revision 362)
@@ -0,0 +1,84 @@
+package de.uni_hildesheim.sse.trans.convert;
+
+import java.util.Set;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import de.uni_hildesheim.sse.model.cst.ConstraintSyntaxTree;
+import de.uni_hildesheim.sse.model.cst.OCLFeatureCall;
+import de.uni_hildesheim.sse.model.cst.VariablePool;
+import de.uni_hildesheim.sse.model.varModel.DecisionVariableDeclaration;
+import de.uni_hildesheim.sse.model.varModel.Project;
+import de.uni_hildesheim.sse.model.varModel.datatypes.BooleanType;
+import de.uni_hildesheim.sse.model.varModel.datatypes.OclKeyWords;
+
+/**
+ * Tests the {@link LiteralFinder}.
+ * @author El-Sharkawy
+ *
+ */
+public class LiteralFinderTest {
+
+    /**
+     * Tests whether the result of two different {@link ConstraintSyntaxTree}s with the same literals is same.
+     */
+    @Test
+    public void testEquality() {
+        Project model = new Project("TestModel");
+        VariablePool pool = new VariablePool();
+        
+        DecisionVariableDeclaration declA = new DecisionVariableDeclaration("a", BooleanType.TYPE, model);
+        DecisionVariableDeclaration declB = new DecisionVariableDeclaration("b", BooleanType.TYPE, model);
+        DecisionVariableDeclaration declC = new DecisionVariableDeclaration("c", BooleanType.TYPE, model);
+        
+        model.add(declA);
+        model.add(declB);
+        model.add(declC);
+        
+        // cst1 = (a or b) or (not c)
+        ConstraintSyntaxTree cst1 = new OCLFeatureCall(pool.obtainVariable(declA), OclKeyWords.OR,
+            pool.obtainVariable(declB));
+        cst1 = new OCLFeatureCall(cst1, OclKeyWords.OR,
+            new OCLFeatureCall(pool.obtainVariable(declC), OclKeyWords.NOT));
+        
+        // cst2 = (not c or b) or (a)
+        ConstraintSyntaxTree cst2 = new OCLFeatureCall(new OCLFeatureCall(pool.obtainVariable(declC), OclKeyWords.NOT),
+            OclKeyWords.OR, pool.obtainVariable(declB));
+        cst2 = new OCLFeatureCall(cst2, OclKeyWords.OR, pool.obtainVariable(declA));
+        
+        // Test: cst1 and cst2 should have the same literals
+        LiteralFinder finder = new LiteralFinder(cst1);
+        Set<String> firstLiterals = finder.getDeclarations();
+        finder = new LiteralFinder(cst2);
+        Set<String> secondLiterals = finder.getDeclarations();
+        Assert.assertTrue(firstLiterals.containsAll(secondLiterals));
+        Assert.assertTrue(secondLiterals.containsAll(firstLiterals));
+    }
+    
+    /**
+     * Tests whether result of positive/negative variables is correct.
+     */
+    @Test
+    public void testCorrectOutput() {
+        Project model = new Project("TestModel");
+        VariablePool pool = new VariablePool();
+        
+        DecisionVariableDeclaration declA = new DecisionVariableDeclaration("a", BooleanType.TYPE, model);
+        DecisionVariableDeclaration declB = new DecisionVariableDeclaration("b", BooleanType.TYPE, model);
+        
+        model.add(declA);
+        model.add(declB);
+        
+        // cst = a or not(b)
+        ConstraintSyntaxTree cst = new OCLFeatureCall(pool.obtainVariable(declA), OclKeyWords.OR,
+                new OCLFeatureCall(pool.obtainVariable(declB), OclKeyWords.NOT));
+        
+        // Test: cst1 and cst2 should have the same literals
+        LiteralFinder finder = new LiteralFinder(cst);
+        Set<String> literals = finder.getDeclarations();
+        Assert.assertEquals(2, literals.size());
+        Assert.assertTrue(literals.contains(declA.getName()));
+        Assert.assertTrue(literals.contains("not(" + declB.getName() + ")"));
+    }
+}
Index: /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/ModelOptimizerTest.java
===================================================================
--- /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/ModelOptimizerTest.java	(revision 361)
+++ /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/ModelOptimizerTest.java	(revision 362)
@@ -34,8 +34,8 @@
         Project model = new Project("TestModel");
         
-        DecisionVariableDeclaration declA = new DecisionVariableDeclaration("a", BooleanType.TYPE, null);
-        DecisionVariableDeclaration declB = new DecisionVariableDeclaration("b", BooleanType.TYPE, null);
-        DecisionVariableDeclaration declC = new DecisionVariableDeclaration("c", BooleanType.TYPE, null);
-        DecisionVariableDeclaration declD = new DecisionVariableDeclaration("d", BooleanType.TYPE, null);
+        DecisionVariableDeclaration declA = new DecisionVariableDeclaration("a", BooleanType.TYPE, model);
+        DecisionVariableDeclaration declB = new DecisionVariableDeclaration("b", BooleanType.TYPE, model);
+        DecisionVariableDeclaration declC = new DecisionVariableDeclaration("c", BooleanType.TYPE, model);
+        DecisionVariableDeclaration declD = new DecisionVariableDeclaration("d", BooleanType.TYPE, model);
         
         model.add(declA);
