@Test
public void shouldNotPerformUpgrade() {

    // given
    when(upgradeService.needUpgrade()).thenReturn(false);
    doAnswer((Answer<Void>) invocation -> {
        ((Runnable) invocation.getArguments()[1]).run();
        return null;
    }).when(forAll).execute(any(), any());
    when(forAll.condition()).thenReturn(o -> () -> true);
    // when
    upgradeTask.execute();
    // then
    verify(security, times(0)).getTenantId();
    verify(upgradeService, times(0)).upgradeVersion();
}