@Override
  protected int command() {
    if (!validateConfigFilePresent()) {
      return 1;
    }

    final MigrationConfig config;
    try {
      config = MigrationConfig.load(getConfigFile());
    } catch (KsqlException | MigrationException e) {
      LOGGER.error(e.getMessage());
      return 1;
    }

    return command(
        config,
        MigrationsUtil::getKsqlClient,
        getMigrationsDir(getConfigFile(), config)
    );
  }
@Test
  public void shouldNotValidateCurrentVersionIfNotMigrated() throws Exception {
    // Given:
    final List<String> versions = ImmutableList.of("1", "2", "3");
    final List<String> checksums = givenExistingMigrationFiles(versions);
    final List<MigrationState> states = ImmutableList.of(MigrationState.MIGRATED, MigrationState.MIGRATED, MigrationState.ERROR);
    givenAppliedMigrations(versions, checksums, states);

    // When:
    final int result = command.command(config, cfg -> ksqlClient, migrationsDir);

    // Then:
    assertThat(result, is(0));

    //
    verifyClientCallsForVersions(versions, "2");
  }