@Test
public void testAssignExecutorInvalidExecutor() throws Exception {

  final ExecutableFlow flow = TestUtils.createTestExecutableFlow("exectest1", "exec1");
  this.executionFlowDao.uploadExecutableFlow(flow);
  // Since we haven't inserted any executors, 1 should be non-existent executor id.
  assertThatThrownBy(
      () -> this.assignExecutor.assignExecutor(1, flow.getExecutionId()))
      .isInstanceOf(ExecutorManagerException.class)
      .hasMessageContaining("non-existent executor");
}