I have created a simple unit test but IntelliJ is incorrectly highlighting it red. marking it as an error
No beans?
What you need to do is add
@ComponentScan("package/include/your/annotation/component") in AppConfiguration.java.
Since I think your AppConfiguraion.java's package is deeper than your annotation component (@Service, @Component...)'s package,
such as "package/include/your/annotation/component/deeper/config".