@Test public void testSubmitJobExecutionEvents() { JobState mockJobState = mock(JobState.class, Mockito.RETURNS_SMART_NULLS); when(mockJobState.getState()).thenReturn(JobState.RunningState.SUCCESSFUL); when(mockJobState.getLauncherType()).thenReturn(LauncherTypeEnum.$UNKNOWN); when(mockJobState.getTrackingURL()).thenReturn(Optional.<String> absent()); TaskState mockTaskState1 = createMockTaskState(); TaskState mockTaskState2 = createMockTaskState(); when(mockJobState.getTaskStates()).thenReturn(Lists.newArrayList(mockTaskState1, mockTaskState2)); this.jobExecutionEventSubmitter.submitJobExecutionEvents(mockJobState); verify(this.mockEventSubmitter, atLeastOnce()).submit(any(String.class), any(Map.class)); }
public void submitJobExecutionEvents(JobState jobState) { submitJobStateEvent(jobState); submitTaskStateEvents(jobState); }
JobExecutionEventSubmitter { public void submitJobExecutionEvents(JobState jobState) { submitJobStateEvent(jobState); submitTaskStateEvents(jobState); } }
JobExecutionEventSubmitter { public void submitJobExecutionEvents(JobState jobState) { submitJobStateEvent(jobState); submitTaskStateEvents(jobState); }  }
JobExecutionEventSubmitter { public void submitJobExecutionEvents(JobState jobState) { submitJobStateEvent(jobState); submitTaskStateEvents(jobState); }  void submitJobExecutionEvents(JobState jobState); }
JobExecutionEventSubmitter { public void submitJobExecutionEvents(JobState jobState) { submitJobStateEvent(jobState); submitTaskStateEvents(jobState); }  void submitJobExecutionEvents(JobState jobState);  }