title: Java class testing issues
body: <p>Hello I have a problem testing this, as I get an error that the testing is not right, can you guys explain why and what are the mistakes? </p>
  
  <pre><code>public void addDays(int x) {
      int y = year;
      day = day + x;     
      if (day &gt; 31) {     
        day = day - 31;   
        addMonths(1); 
  
      } else if (day &gt;= 29 &amp;&amp; month == 2 &amp;&amp; (isLeapYear(y))) {
        day = day - 29;
        addMonths(1);
      } else if (day &gt;= 28 &amp;&amp; month == 2 &amp;&amp; !(isLeapYear(y))) {
        {
          day = day - 28;
          addMonths(1);
  
        }
      }
    }
  </code></pre>
  
  <p>and this is my test for this method (Im using Netbeans).</p>
  
  <pre><code>     @Test
     public void testAddDays() {
      Date z = new Date(31,11,2013);
      z.addDays(3);
   assertEquals(3, z.getDay());
  
  }  
             @Test
     public void testAddDays1() {
      Date z = new Date(28,2,2016);
      z.addDays(3);
   assertEquals(2, z.getDay());
  }  
                @Test
     public void testAddDays2() {
      Date z = new Date(29,2,2014);
      z.addDays(2);
   assertEquals(3, z.getDay());
  }  
  </code></pre>
  
  <p>I would like to know where are my mistakes and how can I fix them</p>