When you run a JUnit test (for example bu right clicking a test method and choosing RUN TEST), IDEA uses the root directory of the Project as the CWD. This is almost always wrong. It should use the root of the module which contains the test.
This is much more annoying than it sounds because it means you have to create a custom configuration every time you run a test. If you forget, the test fails for mysterious reasons because it looks for files in the wrong place.
You can change the default CWD setting for the project but this does not help if you have multiple modules in a project that interact with the file system.