@Override
  public void execute(Context context) {
    executeForBranch(treeRootHolder.getRoot());
  }
@Test
  public void givenNoPreviousUpgradeEvents_whenStepIsExecuted_thenANewUpgradeEventIsCreated() {
    when(sonarQubeVersion.get()).thenReturn(Version.parse("10.3"));
    when(dbClient.eventDao()).thenReturn(mock());
    when(dbClient.eventDao().selectSqUpgradesByMostRecentFirst(any(), any())).thenReturn(Collections.emptyList());

    underTest.execute(new TestComputationStepContext());

    verify(eventRepository, times(1)).add(eventArgumentCaptor.capture());
    verifyNoMoreInteractions(eventRepository);

    assertThat(eventArgumentCaptor.getAllValues())
      .extracting(Event::getCategory, Event::getName)
      .containsExactly(tuple(Event.Category.SQ_UPGRADE, "10.3"));
  }