public static void getFields( DatabaseMeta databaseMeta, String tablename,
                                Consumer<RowMetaInterface> fieldsConsumer ) {
    executeAction( databaseMeta, database -> {
      try {
        fieldsConsumer.accept( database.getTableFields( tablename ) );
      } catch ( KettleDatabaseException | NullPointerException e ) {
        logError( databaseMeta, e );
        fieldsConsumer.accept( new RowMeta() );
      }
    } );
  }
@Test
  @SuppressWarnings( "squid:S2699" )  // assertion is implicit. non-timeout validates that an error event was logged
  public void getFieldsError() throws InterruptedException, ExecutionException, TimeoutException {
    dbMeta.setDatabaseType( "GENERIC" );
    CompletableFuture<RowMetaInterface> rowMetaCompletion = new CompletableFuture<>();
    AsyncDatabaseAction.getFields( dbMeta, "BAZ", rowMetaCompletion::complete );
    errorLogListener.errorOccurred.get( COMPLETION_TIMEOUT, TimeUnit.MILLISECONDS );
  }