I have created a simple unit test but IntelliJ is incorrectly highlighting it red. marking it as an error
No beans?
This seems to still be a bug in the latest IntelliJ and has to do with a possible caching issue?
If you add the @Repository annotation as mk321 mentioned above, save, then remove the annotation and save again, this fixes the problem.