@Override
  public void execute(MigrationStatusListener listener) {
    MigrationContainer migrationContainer = new MigrationContainerImpl(serverContainer, MigrationStepsExecutorImpl.class);
    try {
      MigrationStepsExecutor stepsExecutor = migrationContainer.getComponentByType(MigrationStepsExecutor.class);
      Optional<Long> lastMigrationNumber = migrationHistory.getLastMigrationNumber();

      List<RegisteredMigrationStep> steps = lastMigrationNumber
        .map(i -> migrationSteps.readFrom(i + 1))
        .orElse(migrationSteps.readAll());

      listener.onMigrationsStart(steps.size());
      stepsExecutor.execute(steps, listener);

    } finally {
      migrationContainer.cleanup();
    }
  }
@Test
  void execute_execute_steps_from_last_migration_number_plus_1() {
    when(migrationHistory.getLastMigrationNumber()).thenReturn(Optional.of(50L));
    List<RegisteredMigrationStep> steps = singletonList(new RegisteredMigrationStep(1, "doo", TestMigrationStep.class));
    when(migrationSteps.readFrom(51)).thenReturn(steps);
    when(migrationSteps.readAll()).thenReturn(steps);

    underTest.execute(new NoOpMigrationStatusListener());

    verify(migrationSteps).readFrom(51);
    assertThat(stepRegistry.stepRan).isTrue();
  }