PowerMockito.when(ToGerritRunListener.getInstance()).thenReturn(listener);
AbstractProject project = PowerMockito.mock(AbstractProject.class);
when(project.isBuildable()).thenReturn(true);
GerritProject gP = mock(GerritProject.class);
doReturn(true).when(gP).isInteresting(any(String.class), any(String.class), any(String.class));
when(gP.getFilePaths()).thenReturn(null);
GerritTrigger trigger = Setup.createDefaultTrigger(null);
when(project.getTrigger(GerritTrigger.class)).thenReturn(trigger);
trigger.setGerritProjects(Collections.nCopies(1, gP));
Whitebox.setInternalState(trigger, "myProject", project);