I have never tested with JUnit, not sure what I have to do in this case
@Test(expected = ArrayIndexOutOfBoundsException.class)
public void throwsArrayIndexException() {
...
}
I just have to test that if args[0]==0 in main method, ArrayIndexOutOfBoundsException is expected, I tried with if(args[0]==0){throw new ArrayIndexOutOfBoundException} but didn't work.. I appreciate your help! Thanks in advance!