@Override
  public void commitAndIndexOnBranchEvent(DbSession dbSession, Collection<String> branchUuids, BranchEvent cause) {
    indexOnEvent(dbSession, indexer -> indexer.prepareForRecoveryOnBranchEvent(dbSession, branchUuids, cause));
  }
@Test
  public void commitAndIndexOnBranchEvent_shouldCallIndexerWithSupportedItems() {
    List<EsQueueDto> items1 = List.of(EsQueueDto.create("fake/fake1", "P1"), EsQueueDto.create("fake/fake1", "P1"));
    List<EsQueueDto> items2 = List.of(EsQueueDto.create("fake/fake2", "P1"));

    EventIndexer indexer1 = mock(EventIndexer.class);
    EventIndexer indexer2 = mock(EventIndexer.class);

    DbSession dbSession = mock(DbSession.class);

    IndexersImpl underTest = new IndexersImpl(indexer1, indexer2);
    when(indexer1.prepareForRecoveryOnBranchEvent(dbSession, Set.of("P1"), DELETION)).thenReturn(items1);
    when(indexer2.prepareForRecoveryOnBranchEvent(dbSession, Set.of("P1"), DELETION)).thenReturn(items2);

    underTest.commitAndIndexOnBranchEvent(dbSession, Set.of("P1"), DELETION);

    verify(indexer1).index(dbSession, items1);
    verify(indexer2).index(dbSession, items2);
  }