title: Why jUnit 5 doesn't see my exception test?
body: <p>I've written 48 test methods to test my course assignment. None of them is an exceptional test but they are working correctly.</p>
  <p>Finally, I tried to test my own exceptions, JUnit 5 doesn't see it. There are some examples of my code design and exception test.</p>
  <pre><code>import static org.junit.jupiter.api.Assertions.*;
  import org.junit.Test;
  import junit.framework.TestCase;
  
  public class Final_Tests extends TestCase {
      
      @Test
      public static void testD4_setChair() {
      Department testD = new Department(&quot;CSE 101&quot;,&quot;CSE 101!&quot;);
      Teacher testT = new Teacher(&quot;Ali&quot;,&quot;Veli.com&quot;,testD,&quot;CV&quot;);
      testD.setChair(testT);
      assertEquals(testT,testD.getChair());
  }
  </code></pre>
  <p>There is no problem with testing non-exception methods.</p>
  <p>The problem is here:</p>
  <pre><code>@Test 
  public static void DepartmentMismatchException_Test() {
  Department testD = new Department(&quot;CSE 101&quot;,&quot;CSE 101!&quot;);
  Teacher testT = new Teacher(&quot;Mehmet&quot;, &quot;mehmet.com&quot;, testD, &quot;CV Mehmet&quot;);
  Course testC1 = new Course(testD,101,&quot;Test Course 1&quot;,&quot;Test Course 1 Desc.&quot;,testT,6);
  String expMsg = &quot;DepartmentMismatchException: Teacher in &quot; + testT.getDepartment().getCode()+ &quot;, Course in &quot; +testC1.getDepartment().getCode();
      
  DepartmentMismatchException dme =  new DepartmentMismatchException(testT.getDepartment(), testC1.getDepartment());
      assertEquals(expMsg, dme.toString());
  }
  </code></pre>
  <p>Is a problem with code design like usage of scopes, static or other modifiers, or about my exception test codes?</p>