I am trying to do a JUnit test on code that someone else has written, but I cannot figure out how to test for the exception, because the exception seems to lack a type.
You can use JUnit 'expected' to test exceptions:
@Test(expected = ExceptionYouWishToTestFor.class) public void divisionWithException() { // Test Code }
After that it's up to you to throw that particular exception in your code.