@Test
public void testFailureDuringExecutorPing() throws Exception {

  this.activeFlows.put(EXECUTION_ID_11, new Pair<>(
      new ExecutionReference(EXECUTION_ID_11, this.executor1), this.flow1));
  this.activeFlows.put(EXECUTION_ID_12, new Pair<>(
      new ExecutionReference(EXECUTION_ID_12, this.executor2), this.flow2));
  // Throw a runtime exception for both executors.
  when(this.apiGateway.callWithExecutionId(this.executor1.getHost(), this.executor1.getPort(),
      ConnectorParams.PING_ACTION, null, null)).thenThrow(new RuntimeException("test exception"));
  when(this.apiGateway.callWithExecutionId(this.executor2.getHost(), this.executor2.getPort(),
      ConnectorParams.PING_ACTION, null, null)).thenThrow(new RuntimeException("test exception"));
  this.executorHealthChecker.checkExecutorHealth();
  // Verify ping API is called for both executors. Implying that runtime exception for one of the
  // executors did not prevent the check on other executor.
  verify(this.apiGateway).callWithExecutionId(this.executor1.getHost(),
      this.executor1.getPort(), ConnectorParams.PING_ACTION, null, null);
  verify(this.apiGateway).callWithExecutionId(this.executor2.getHost(),
      this.executor2.getPort(), ConnectorParams.PING_ACTION, null, null);
  verifyZeroInteractions(this.alerterHolder);
}