This happens due to incorrect Source folder mappings done by some mistake.
In order to resolve the same, please go to
Project Structure -> Project Settings -> Modules.
Select the Module that has this issue and select the Sources Tab
On the Right Hand Side you will find Add Content Root pane. Please Check if the Source and Test Folders are mapping to the correct root and there is no other mapping present apart from the valid root mapping [For eg src for Source Folders and tst for Test Source Folders.]
Delete any unwanted mapping present in either of them. Apply and Re sync the project.
Issue should be solved now.