@Test
    public void testTasks()
    {
        Task heute,invalid;

        try {
            //anpassen an aktuellen tag!
            heute=new Task(2012, 11, 16,"heute");
        } catch (InvalidTaskException ex) {
            fail(ex.getMessage());
        }

        invalid=null;
        try {
            invalid=new Task(2011, 11, 16,"invalid year");
            fail("Task "+invalid+" should throw an InvalidTaskException!");
        } catch (InvalidTaskException ex) {
            System.out.println(ex.getMessage());
        }
        assertNull("invalid should be null!",invalid);

        invalid=null;
        try {
            invalid=new Task(2012, 13, 16,"invalid month");
            fail("Task "+invalid+" should throw an InvalidTaskException!");
        } catch (InvalidTaskException ex) {
            System.out.println(ex.getMessage());
        }
        assertNull("invalid should be null!",invalid);

        invalid=null;
        try {
            invalid=new Task(2012, 0, 16,"invalid month");
            fail("Task "+invalid+" should throw an InvalidTaskException!");
        } catch (InvalidTaskException ex) {
            System.out.println(ex.getMessage());
        }
        assertNull("invalid should be null!",invalid);

        invalid=null;
        try {
            //kein Schaltjahr
            invalid=new Task(2013, 2, 29,"invalid day (no leapyear)");
            fail("Task "+invalid+" should throw an InvalidTaskException!");
        } catch (InvalidTaskException ex) {
            System.out.println(ex.getMessage());
        }
        assertNull("invalid should be null!",invalid);

        invalid=null;
        try {
            invalid=new Task(2012, 9, 31,"invalid day (too much days in a month)");
            fail("Task "+invalid+" should throw an InvalidTaskException!");
        } catch (InvalidTaskException ex) {
            System.out.println(ex.getMessage());
        }
        assertNull("invalid should be null!",invalid);

    }