I have the following test:
@Test(expected = ParseException.class)
public void parserTest4() {
MeticParser.run("send+me-more=money");
}
Note that this test must not be changed.(Its from a test class given from my University)
My problem is that the ParseException is a checked exception so it must eiter be surrounded with try/catch or a throws statement must be added to the methode head.
Using try/catch JUnit wont see a ParseException being thrown.
Using the throws signatur will result in me changing the test class (not allowed) since it must be given upwards until its being handeld.
Is there a workaround of some sort?