@Override
  public void start() {
    if (serverUpgradeStatus.isFreshInstall()) {
      LoggerFactory.getLogger(getClass()).info("Automatically perform DB migration on fresh install");
      migrationEngine.execute(new MigrationStatusListenerImpl(databaseMigrationState));
    } else if (serverUpgradeStatus.isUpgraded() && serverUpgradeStatus.isAutoDbUpgrade()) {
      LoggerFactory.getLogger(getClass()).info("Automatically perform DB migration, as automatic database upgrade is enabled");
      migrationEngine.execute(new MigrationStatusListenerImpl(databaseMigrationState));
    }
  }
@Test
  public void start_does_nothing_if_autoDbMigration_but_no_upgrade() {
    mockFreshInstall(false);
    when(serverUpgradeStatus.isUpgraded()).thenReturn(false);
    when(serverUpgradeStatus.isAutoDbUpgrade()).thenReturn(true);

    underTest.start();

    verifyNoInteractions(migrationEngine);
    assertThat(logTester.logs(Level.INFO)).isEmpty();
  }