0

I am writing a test case which I consider handling exception in it. I wrote it this way.

@Test
public void myTest() {
    int result = mymethod(a + b);
    try{
        assertEquals(1, result);
    }catch(Exception e){
        throw new RuntimeException();
    }

}

Is this the write way? I am a little bit confused as I have not done this before.

Tesfa Zelalem
  • 619
  • 1
  • 9
  • 18

0 Answers0