### Question:
KettleDatabaseRepositoryCreationHelper { protected int getRepoStringLength() { return database.getDatabaseMeta().getDatabaseInterface().getMaxVARCHARLength() - 1 > 0 ? database.getDatabaseMeta() .getDatabaseInterface().getMaxVARCHARLength() - 1 : KettleDatabaseRepository.REP_ORACLE_STRING_LENGTH; } KettleDatabaseRepositoryCreationHelper( KettleDatabaseRepository repository ); synchronized void createRepositorySchema( ProgressMonitorListener monitor, boolean upgrade,
    List<String> statements, boolean dryrun ); List<String> updateStepTypes( List<String> statements, boolean dryrun, boolean create ); List<String> updateDatabaseTypes( List<String> statements, boolean dryrun, boolean create ); void updateJobEntryTypes( List<String> statements, boolean dryrun, boolean create );  }### Answer:
@Test public void testOracleDBRepoStringLength() throws Exception { KettleEnvironment.init(); DatabaseMeta databaseMeta = new DatabaseMeta( "OraRepo", "ORACLE", "JDBC", null, "test", null, null, null ); repositoryMeta = new KettleDatabaseRepositoryMeta( "KettleDatabaseRepository", "OraRepo", "Ora Repository", databaseMeta ); repository = new KettleDatabaseRepository(); repository.init( repositoryMeta ); KettleDatabaseRepositoryCreationHelper helper = new KettleDatabaseRepositoryCreationHelper( repository ); int repoStringLength = helper.getRepoStringLength(); assertEquals( EXPECTED_ORACLE_DB_REPO_STRING, repoStringLength ); }
@Test public void testDefaultDBRepoStringLength() throws Exception { KettleEnvironment.init(); DatabaseMeta databaseMeta = new DatabaseMeta(); databaseMeta.setDatabaseInterface( new TestDatabaseMeta() ); repositoryMeta = new KettleDatabaseRepositoryMeta( "KettleDatabaseRepository", "TestRepo", "Test Repository", databaseMeta ); repository = new KettleDatabaseRepository(); repository.init( repositoryMeta ); KettleDatabaseRepositoryCreationHelper helper = new KettleDatabaseRepositoryCreationHelper( repository ); int repoStringLength = helper.getRepoStringLength(); assertEquals( EXPECTED_DEFAULT_DB_REPO_STRING, repoStringLength ); }