I'm trying to test for an exception with JUnit 4.11. I saw a similar post here (JUnit expected tag not working as expected) and I've attempted everything they said, but still not working.
Here's my code:
import org.junit.*;
public class MaybeException {
@Test(expected = Exception.class)
public void ME1() { throw new Exception(); }
}
but bash is still telling me error: unreported exception Exception; must be caught or declared to be thrown
.