I ran the intelliJ code inspection and it gave me a "Unnecessary module dependency". I "fixed it" but indeed it was a false positive.
So I clicked to "fix it" and it removed the dependency of my test-folder from the source-folder, however now all my test classes give me the "Unresolved reference" error. How do I revert it? Or maybe, how do I add the dependency again?
If this is a Gradle project, the dependency should be re-added if you simply reimport it from Gradle (press the "Refresh all Gradle projects" toolbar button in the Gradle toolwindow).