@Override
  public long getPendingCount() {
    try (DbSession dbSession = dbClient.openSession(false)) {
      return dbClient.ceQueueDao().countByStatus(dbSession, CeQueueDto.Status.PENDING);
    }
  }
@Test
  public void count_Pending_from_database() {
    when(getDbClient().ceQueueDao().countByStatus(any(), eq(CeQueueDto.Status.PENDING))).thenReturn(42);

    assertThat(underTest.getPendingCount()).isEqualTo(42);
  }