Why didnt you use Spring configuration for the unit test?