@Override
  public SearchResult<String> searchTasks(
      String taskName, String status, int start, int count, List<String> options) {
    return withMetricLogError(
        () -> getSearchIds(GET_TASK_IDS_STATEMENT, taskName, status, start, count, options),
        "searchTasks",
        "Failed searching tasks by task name {} with status {}",
        taskName,
        status);
  }
@Test
  public void searchTasksTest() {
    SearchResult<String> result = dao.searchTasks(TEST_TASK_DEF_NAME, "IN_PROGRESS", 0, 10, null);
    assertEquals(0, result.getTotalHits());
    Task task = createRunningTestTask(TEST_TASK_ID_1);
    executionDAO.updateTask(task);
    result = dao.searchTasks(TEST_TASK_DEF_NAME, "IN_PROGRESS", 0, 10, null);
    assertEquals(1, result.getTotalHits());
    assertEquals(TEST_TASK_ID_1, result.getResults().get(0));
    result = dao.searchTasks(TEST_TASK_DEF_NAME, "IN_PROGRESS", 1, 10, null);
    assertEquals(0, result.getTotalHits());
  }