mocked repository object returns empty results from controller testcase?
问题 Repository object not mocked from controller testcase return empty object here is the below code @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = Main.class) @WebAppConfiguration @ActiveProfiles(ApplicationConstants.DEVELOPMENT_PROFILE) public class EmployeeControllerRealTest { @Autowired private WebApplicationContext webAppContext; private MockMvc mockMvc; @Mock EmployeeRepository employeeRepository; @InjectMocks EmployeeCompositeService