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);