Index: /Code/ModelTranslator/input/testModel.model
===================================================================
--- /Code/ModelTranslator/input/testModel.model	(revision 64)
+++ /Code/ModelTranslator/input/testModel.model	(revision 64)
@@ -0,0 +1,9 @@
+# A small test-model
+# Has 7 constraints and 6 variables
+(!def(AB3100_CORE_MODULE)|def(MODULES))
+(!def(AB3100_CORE)|!def(AB3100_CORE_MODULE))
+((def(HAS_IOMEM)&def(I2C))|(def(HAS_IOMEM)&(def(I2C)|def(I2C_MODULE)))|def(MODULES)|!def(AB3100_CORE))
+((def(HAS_IOMEM)&def(I2C))|(def(HAS_IOMEM)&(def(I2C)|def(I2C_MODULE)))|!def(MODULES)|!def(AB3100_CORE_MODULE))
+((def(HAS_IOMEM)&def(I2C))|(def(HAS_IOMEM)&(def(I2C)|def(I2C_MODULE)))|!def(MODULES)|!def(AB3100_CORE))
+((def(HAS_IOMEM)&def(I2C))|(def(HAS_IOMEM)&(def(I2C)|def(I2C_MODULE)))|!def(AB3100_CORE_MODULE))
+(!def(AB3100_CORE)|(def(HAS_IOMEM)&def(I2C)))
Index: /Code/ModelTranslator/src/de/uni_hildesheim/sse/trans/convert/MaxTermConverter.java
===================================================================
--- /Code/ModelTranslator/src/de/uni_hildesheim/sse/trans/convert/MaxTermConverter.java	(revision 63)
+++ /Code/ModelTranslator/src/de/uni_hildesheim/sse/trans/convert/MaxTermConverter.java	(revision 64)
@@ -113,4 +113,9 @@
             for (int j = 0; j < state.length; j++) {
                 IDecisionVariable decisionVar = config.getDecision(declarationArray[j]);
+                /*
+                 * i is a bit-field where each bit represents one variable
+                 * j is the current variable
+                 * To test if variable #j is true check if the bit #j in i is 0 or 1
+                 */
                 if ((i & (1 << j)) != 0) {
                     state[j] = true;
Index: /Code/ModelTranslator/src/de/uni_hildesheim/sse/trans/in/ModelReader.java
===================================================================
--- /Code/ModelTranslator/src/de/uni_hildesheim/sse/trans/in/ModelReader.java	(revision 63)
+++ /Code/ModelTranslator/src/de/uni_hildesheim/sse/trans/in/ModelReader.java	(revision 64)
@@ -11,4 +11,5 @@
 import org.apache.commons.io.FilenameUtils;
 
+import de.uni_hildesheim.sse.model.cst.CSTSemanticException;
 import de.uni_hildesheim.sse.model.cst.ConstraintSyntaxTree;
 import de.uni_hildesheim.sse.model.cst.OCLFeatureCall;
@@ -91,8 +92,8 @@
      * 
      * @param line the line to read
+     * @param ebene for debug TODO
      * @return a {@link ConstraintSyntaxTree} representing the line
-     * @throws TODO
-     */
-    public ConstraintSyntaxTree parseLine(String line, int ebene) throws Exception {
+     */
+    public ConstraintSyntaxTree parseLine(String line, int ebene) {
         StringBuffer debugLine = new StringBuffer();
         for (int i = 0; i < ebene; i++) {
@@ -202,11 +203,12 @@
             // Skip lines starting with a #
             if (line.charAt(0) != '#') {
+                ConstraintSyntaxTree cst = parseLine(line, 0);
+                Constraint constraint = new Constraint(model);
                 try {
-                    ConstraintSyntaxTree cst = parseLine(line, 0);
-                    Constraint constraint = new Constraint(model);
                     constraint.setConsSyntax(cst);
                     model.add(constraint);
-                } catch (Exception e) {
-                    
+                } catch (CSTSemanticException e) {
+                    // TODO
+                    LOGGER.exception(e);
                 }
             }
Index: /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/MaxTermConverterTest.java
===================================================================
--- /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/MaxTermConverterTest.java	(revision 63)
+++ /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/convert/MaxTermConverterTest.java	(revision 64)
@@ -2,5 +2,4 @@
 
 import org.junit.Assert;
-import org.junit.Ignore;
 import org.junit.Test;
 
@@ -9,4 +8,5 @@
 import de.uni_hildesheim.sse.model.confModel.ConfigurationException;
 import de.uni_hildesheim.sse.model.cst.CSTSemanticException;
+import de.uni_hildesheim.sse.model.cst.ConstraintSyntaxTree;
 import de.uni_hildesheim.sse.model.cst.OCLFeatureCall;
 import de.uni_hildesheim.sse.model.cst.Parenthesis;
@@ -62,5 +62,4 @@
         try {
             constraint.setConsSyntax(completeTerm);
-            //testProject.add(constraint);
         } catch (CSTSemanticException e) {
             Assert.fail(e.getMessage());
@@ -70,9 +69,20 @@
         
         ConstraintFinder finder = new ConstraintFinder(testProject);
-        /*DebugConstraintTreeVisitor visitor = new DebugConstraintTreeVisitor(System.out);
         for (Constraint c : finder.getConstraints()) {
-            c.getConsSyntax().accept(visitor);
-        }*/
-        Assert.assertEquals(4, finder.getConstraints().size());
+            testConstraint(c.getConsSyntax());
+        }
+    }
+    
+    /**
+     * Tests whether a constraint only contains OR's and NOT's.
+     * @param tree The constraint to be tested.
+     */
+    private void testConstraint(ConstraintSyntaxTree tree) {
+        if (tree instanceof OCLFeatureCall) {
+            OCLFeatureCall call = (OCLFeatureCall) tree;
+            Assert.assertTrue(call.getOperation().equals(OclKeyWords.OR)
+                    || call.getOperation().equals(OclKeyWords.NOT));
+            testConstraint(call.getOperand());
+        }
     }
     
@@ -129,7 +139,4 @@
         completeTerm.accept(evaluator);
         
-        System.out.println(evaluator.constraintFailed());
-        System.out.println(evaluator.constraintFulfilled());
-        System.out.println(evaluator.constraintUndefined());
         Assert.assertTrue(evaluator.constraintFailed());
     }
Index: /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/in/ModelReaderTest.java
===================================================================
--- /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/in/ModelReaderTest.java	(revision 63)
+++ /Code/ModelTranslator/test/de/uni_hildesheim/sse/trans/in/ModelReaderTest.java	(revision 64)
@@ -3,15 +3,19 @@
 import java.io.File;
 import java.io.IOException;
-import java.io.PrintStream;
-import java.io.StringWriter;
 
-import org.apache.commons.io.output.WriterOutputStream;
 import org.junit.Assert;
 import org.junit.Before;
 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.Variable;
 import de.uni_hildesheim.sse.model.varModel.Project;
+import de.uni_hildesheim.sse.model.varModel.datatypes.OclKeyWords;
+import de.uni_hildesheim.sse.model.varModel.filter.ConstraintFinder;
+import de.uni_hildesheim.sse.model.varModel.filter.DeclarationFinder;
+import de.uni_hildesheim.sse.model.varModel.filter.FilterType;
+import de.uni_hildesheim.sse.model.varModel.filter.DeclarationFinder.VisibilityType;
 import de.uni_hildesheim.sse.trans.AllTests;
-import de.uni_hildesheim.sse.trans.out.DimacsWriter;
 
 /**
@@ -21,45 +25,51 @@
  */
 public class ModelReaderTest {
-    
-    private StringWriter sWriter;
-    //private IVMLWriter iWriter;
-    
+
     /**
-     * Creates the writer for parsing the created result (the {@link Project}.
+     * Tests the read method of the {@link ModelReader}.
+     * @throws IOException when the {@link ModelReader} throws an {@link IOException}.
      */
-    @Before
-    public void setUp() {
-        sWriter = new StringWriter();
-        //iWriter = new IVMLWriter(sWriter);
-    }
-
     @Test
     public void testRead() throws IOException {
-        File modelFile = new File(AllTests.INPUT_FOLDER, "model.model");
+        File modelFile = new File(AllTests.INPUT_FOLDER, "testModel.model");
         ModelReader reader = new ModelReader(modelFile);
         Project project = reader.read();
         
-        //PrintStream writer = new PrintStream(new WriterOutputStream(sWriter));
-        //new DimacsWriter(project).write(System.out);
+        ConstraintFinder cFinder = new ConstraintFinder(project);
+        Assert.assertEquals(7, cFinder.getConstraints().size());
         
-        //System.out.println(sWriter);
-        
-        //project.accept(iWriter);
-        //System.out.println(sWriter);
+        DeclarationFinder varFinder = new DeclarationFinder(project, FilterType.ALL, null);
+        Assert.assertEquals(6, varFinder.getVariableDeclarations(VisibilityType.ALL).size());
     }
     
+    /**
+     * Tests the parseLine method.
+     * @throws IOException when the {@link ModelReader} throws an {@link IOException}.
+     */
     @Test
     public void testParseLine() throws IOException {
-        File modelFile = new File(AllTests.INPUT_FOLDER, "model.model");
+        File modelFile = new File(AllTests.INPUT_FOLDER, "testModel.model");
         ModelReader reader = new ModelReader(modelFile);
         
-        try {
-            //reader.parseLine("(!def(3C515_MODULE)|def(MODULES))");
-            reader.parseLine("((def(TR)&def(PCI)&def(NETDEVICES))|(def(NETDEVICES)&((def(TR)&def(PCI))|"
+        ConstraintSyntaxTree tree = reader.parseLine("(!def(3C515_MODULE)|def(MODULES))", 0);
+        Assert.assertTrue(tree instanceof OCLFeatureCall);
+        OCLFeatureCall call = (OCLFeatureCall) tree;
+        Assert.assertEquals(OclKeyWords.OR, call.getOperation());
+        ConstraintSyntaxTree side1 = call.getParameter(0);
+        ConstraintSyntaxTree side2 = call.getOperand();
+        if (side1 instanceof Variable) {
+            Assert.assertTrue(side2 instanceof OCLFeatureCall);
+            Assert.assertEquals(OclKeyWords.NOT, ((OCLFeatureCall) side2).getOperation());
+        } else if (side2 instanceof Variable) {
+            Assert.assertTrue(side1 instanceof OCLFeatureCall);
+            Assert.assertEquals(OclKeyWords.NOT, ((OCLFeatureCall) side1).getOperation());
+        } else {
+            Assert.fail("Neither side is a variable.");
+        }
+        
+        tree = reader.parseLine(
+                "((def(TR)&def(PCI)&def(NETDEVICES))|(def(NETDEVICES)&((def(TR)&def(PCI))|"
                 + "(def(PCI)&(def(TR)|def(TR_MODULE)))))|def(MODULES)|!def(3C359))", 0);
-        } catch (Exception e) {
-            e.printStackTrace();
-            Assert.fail(e.toString());
-        }
+        Assert.assertTrue(tree instanceof OCLFeatureCall);
     }
 
