Index: liacs/TOOS/assignment1/src/Census.java
===================================================================
--- liacs/TOOS/assignment1/src/Census.java	(revision 209)
+++ liacs/TOOS/assignment1/src/Census.java	(revision 210)
@@ -22,21 +22,27 @@
    * @return boolean with conjuction of voters or null on error.
    */
-  public static Boolean census(HashSet<Voter> voters) {
+  public Boolean census(HashSet<Voter> voters) {
+    logger.debug("Starting new comparison");
 
     /* Nobody likes voting on Tuesday don't they? */
     Calendar rightNow = Calendar.getInstance();
     if (rightNow.get(Calendar.DAY_OF_WEEK) == Calendar.WEDNESDAY) {
+      logger.debug("Sorry not today");
       return false;
+    }
+
+    /* No voters return error as result cannot be conclusive */
+    if (voters == null) {
+      return null;
     }
 
     /* Check all votes to make it a fair voting system */
     for (Voter v: voters) {
-      logger.debug(v.getVote());
       /* Some vote is not set correctly or of wrong return value */
-      if (v.getVote() == null || (!(v.getVote() instanceof Boolean))) { 
-        logger.debug("Invalid type");
+      if (v == null || v.getVote() == null || (!(v.getVote() instanceof Boolean))) { 
         return null;
       }
 
+      logger.debug(v.getVote());
       /* All has to be in agreement */
       if (v.getVote() == false) {
Index: liacs/TOOS/assignment1/src/CensusTest.java
===================================================================
--- liacs/TOOS/assignment1/src/CensusTest.java	(revision 209)
+++ liacs/TOOS/assignment1/src/CensusTest.java	(revision 210)
@@ -11,5 +11,5 @@
       HashSet<Voter> v = null;
       Census c = new Census();
-      assertTrue(c.census(v).equals(null));    
+      assertNull(c.census(v));    
     }
 
@@ -35,3 +35,32 @@
       assertFalse(c.census(v));    
     }
+
+    public void testInvalidVoter() {
+      HashSet<Voter> v = new HashSet<Voter>();
+      v.add(new Voter(true));
+      v.add(new Voter(true));
+      v.add(new Voter(false));
+      v.add(null);
+
+      Census c = new Census();
+      assertNull(c.census(v));    
+    }
+
+    public void testDuplicateVote() {
+      HashSet<Voter> v = new HashSet<Voter>();
+      Voter d = new Voter(true);
+      assertTrue(v.add(d));
+      assertFalse(v.add(d));
+    }
+
+    public void testUnusedVote() {
+      HashSet<Voter> v = new HashSet<Voter>();
+      v.add(new Voter(true));
+      v.add(new Voter(true));
+      v.add(new Voter(false));
+      v.add(new Voter());
+
+      Census c = new Census();
+      assertNull(c.census(v));    
+    }
 }
Index: liacs/TOOS/assignment1/src/VoterTest.java
===================================================================
--- liacs/TOOS/assignment1/src/VoterTest.java	(revision 210)
+++ liacs/TOOS/assignment1/src/VoterTest.java	(revision 210)
@@ -0,0 +1,30 @@
+import java.util.Calendar;
+import java.util.HashSet;
+import java.util.Enumeration;
+
+import nl.rickvanderzwet.toos.assignment1.Voter;
+
+/** 
+ * Make sure both the variable and the function return the proper values if set.
+ */
+public class VoterTest extends junit.framework.TestCase {
+
+
+    public void testTrueVote() {
+      Voter v = new Voter(true);
+      assertTrue(v.fvote);
+      assertTrue(v.getVote());
+    }
+
+    public void testFalseVote() {
+      Voter v = new Voter(false);
+      assertFalse(v.fvote);
+      assertFalse(v.getVote());
+    }
+
+    public void testEmptyVote() {
+      Voter v = new Voter();
+      assertNull(v.fvote);
+      assertNull(v.getVote());
+    }
+}
Index: liacs/TOOS/assignment1/src/log4j.properties
===================================================================
--- liacs/TOOS/assignment1/src/log4j.properties	(revision 210)
+++ liacs/TOOS/assignment1/src/log4j.properties	(revision 210)
@@ -0,0 +1,6 @@
+log4j.rootLogger=DEBUG,stdout
+#
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+#
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%r [%t] %p %C  - %m%n
