public void meddle(MigrationHistory migrationHistory) {
    // change last migration number on specific cases
    migrationHistory.getLastMigrationNumber()
      .ifPresent(migrationNumber -> {
        Long newMigrationNumber = meddledSteps.get(migrationNumber);
        if (newMigrationNumber != null) {
          RegisteredMigrationStep registeredMigrationStep = migrationSteps.readFrom(newMigrationNumber).get(0);
          migrationHistory.done(registeredMigrationStep);
        }
      });
  }
@Test
  public void no_effect_if_no_last_migration_number() {
    when(migrationHistory.getLastMigrationNumber()).thenReturn(Optional.empty());

    underTest.meddle(migrationHistory);

    verify(migrationHistory).getLastMigrationNumber();
    verifyNoMoreInteractions(migrationHistory, migrationSteps);
  }