I am new to Spring and Junit testing. I am trying to understand use of @RunWith(SpringJUnit4ClassRunner.class) and @ContextConfiguration(locations= {/dao-context.xml}) on line 1 and line 2nd below in my test. dao-context has datasource , entityManagerFactory and TranasctionManager beans defined.
@RunWith(SpringJUnit4ClassRunner.class) //Line 1
@ContextConfiguration(locations= {/dao-context.xml}) //Line2
Public class ProductServiceTest{
@Autowired
private void ProductDao productDao
......
.......
}