I think you need to make the constructor of FileInputStream throw a FileNotFoundException, that should be fairly easy if you pass a 'input' that do not match any file.
- Don't use "System.out.println" directly, many if not all quality tool have rules on this matter activated by default.
- If you actually want to test that line, I would rather have a dependency called Reporter or something, with a method name that explains what you want to report. This reporter could be injected in your code. This could mean you can verify that report.reportScannerIsNull() is called.
But depending on what you want this might not apply. If you want to mock classes in rt.jar, I'm not sure it's doable in the Unit Test only, you might need to actually add the powermock agent; Johan can confirm that.
Cheers,