I have created a simple unit test but IntelliJ is incorrectly highlighting it red. marking it as an error
No beans?
Use @EnableAutoConfiguration annotation with @Component at class level. It will resolve this problem.
For example:
@Component
@EnableAutoConfiguration
public class ItemDataInitializer {
@Autowired
private ItemReactiveRepository itemReactiveRepository;
@Autowired
private MongoOperations mongoOperations;
}