public static void getTables( DatabaseMeta databaseMeta, String schema, Consumer<String[]> tablesConsumer ) {
    executeAction( databaseMeta, database -> {
      try {
        tablesConsumer.accept( database.getTablenames( schema, false ) );
      } catch ( KettleDatabaseException | NullPointerException e ) {
        logError( databaseMeta, e );
        tablesConsumer.accept( new String[ 0 ] );
      }
    } );
  }
@Test
  @SuppressWarnings( "squid:S2699" )  // assertion is implicit. non-timeout validates that an error event was logged
  public void getTablesError() throws InterruptedException, ExecutionException, TimeoutException {
    dbMeta.setDatabaseType( "GENERIC" );
    AsyncDatabaseAction.getTables( dbMeta, "PUBLIC", completion::complete );
    errorLogListener.errorOccurred.get( COMPLETION_TIMEOUT, TimeUnit.MILLISECONDS );
  }