My SpringBoot application has three modules
controller
service
dao
I am writing a test case for a class EmployeeDetailsController.java as EmployeeDetailsControllerTest.java inside tests folder of a springboot application.
But when I run the EmployeeDetailsControllerTest I get the below error
java: package com.example.employee.response does not exist
......
.......
This error is seen for all the imports used inside a java file EmployeeRegistrationController.java and import from other helper classes
I do not understand why it is pointing to the files in java package even when I run a test class inside tests package.
Below is the dependency I have added inside pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
Below is the structure. Sorry for the naming structure for the post and my project