protected void verifyBuildTrigger(StaplerRequest request) throws IOException, InterruptedException {
Payload payload = mock(Payload.class);
DynamicProject projectForRepo = mock(DynamicProject.class);
DynamicProjectRepository projectRepo = mock(DynamicProjectRepository.class);
when(payload.needsBuild()).thenReturn(true);
when(payload.getProjectUrl()).thenReturn("git@repo");
when(projectRepo.getJobsFor("git@repo")).thenReturn(newArrayList(projectForRepo));
doReturn(payload).when(githubWebhook).makePayload("payload");
doReturn(projectRepo).when(githubWebhook).makeDynamicProjectRepo();
githubWebhook.doIndex(request, null);