title: Spring data repository not injecting with @Mock in test case class returns null?
body: <p>Repository object not injecting in testcase class.
      Here is my below test class  code</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @SpringApplicationConfiguration(classesExternalProviderMain.class)
  @ActiveProfiles(ApplicationConstants.DEVELOPMENT_PROFILE)
  @WebAppConfiguration
  public class EmployeeServiceTest {
  @InjectMocks
  EmployeeService employeeService; //not injected null 
  @Mock
  EmployeeRepository employeeRepository;//not injected null
  @Test
  public void testEmployee() {
      Mockito.when(employeeRepository.findByName(Stringname)).thenReturn(getEmployee());
      List&lt;Employee&gt; resultedTrackbles = employeeService.getEmployeeByName("mike");
  }
  private List&lt;Employee&gt; getEmployee(){
  //here is the logic to return List&lt;Employees&gt;
  }
  }
  </code></pre>
  
  <p>Can you please help me how to inject my "EmployeeRepository" and Do  need to write any additional logic.</p>