How to Add Throws IOException to JUnit Test

I’m a teacher writing JUnit tests for my assignments. One of my tests needs to have “throws IOException” after the method header, but I can’t add to that line (the cursor won’t let me type there). Here’s a screenshot of what I have:

Any ideas?

I figured out a workaround - using a try/catch statement instead of adding anything to the method header.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.