MockitoAnnotations.initMocks(this);
documentService = new DocumentServiceImpl();
documentService.init(projectIterationDAO, documentDAO, msgs);
HProjectIteration version = Mockito.mock(HProjectIteration.class);
HProject project = Mockito.mock(HProject.class);
HDocument document = Mockito.mock(HDocument.class);
webHooks = Lists.newArrayList();
webHooks.add(new WebHook(project, "http://test.com"));
webHooks.add(new WebHook(project, "http://test1.com"));
when(projectIterationDAO.findById(versionId)).thenReturn(version);
when(version.getProject()).thenReturn(project);
when(version.getSlug()).thenReturn(versionSlug);
when(project.getSlug()).thenReturn(projectSlug);
when(project.getWebHooks()).thenReturn(webHooks);
when(documentDAO.getById(docId)).thenReturn(document);
when(document.getDocId()).thenReturn(docIdString);
when(msgs.format(anyString())).thenReturn("test message");
}