title: Junit test for boolean method
body: <p>how can I create a test method using asseertEquals  for method  Boolean isEqual(Semester semester) with Boolean type in class Semester? </p>
  
  <p>here is the code for class Semester and the junit  test for class Semester</p>
  
  <h3>Semester</h3>
  
  <pre><code>public class Semester {
      private String year;
      private String name;
  
      public Semester() {
          year = null;
          name = null;
      }
  
      public Semester(String year, String name) {
          this.year = year;
          this.name = name;
      }
  
      public boolean isEqual(Semester semestr) {
          return ((semestr.name.equals(this.name)) &amp;&amp; (semestr.year
              .equals(this.year)));
      }
  
      public String getYear() {
          return year;
      }
  
      public String getName() {
          return name;
      }
  }     
  </code></pre>
  
  <h3>SemesterTest</h3>
  
  <pre><code>public class SemesterTestCase1 {
      private Semester semster=new Semester("2014","Fall");
  
      @Test
      public void testIsEqual() {
  
      }
  
      @Test
      public void testGetYear() {
          assertEquals("2014",semster.getYear());
      }
  
      @Test
      public void testGetName() {
          assertEquals("Fall",semster.getName());
      }
  }
  </code></pre>