Maybe you missed to use Spring in your Test? How the documentService
is injected?
Add @RunWith(SpringJUnit4ClassRunner.class)
to your test class to enable Spring in the test. If you use autowire that should be all. You may also need a @ContextConfiguration
annotation to your test and/or add @Resource
to the members to be injected.