PowerMockito.mockStatic(GerritMessageProvider.class);
when(GerritMessageProvider.all()).thenReturn(null);
TaskListener taskListener = mock(TaskListener.class);
GerritCmdRunner mockGerritCmdRunner = mock(GerritCmdRunner.class);
AbstractBuild build = mock(AbstractBuild.class);
when(build.getResult()).thenReturn(Result.SUCCESS);
EnvVars env = Setup.createEnvVars();
when(build.getEnvironment(taskListener)).thenReturn(env);