code: public static Connection connectToDatabase(final String jdbcDriver,
                                                 final String connectionString,
                                                 final String username,
                                                 final String password)
              throws ClassNotFoundException, SQLException {
          //Load jdbc driver
          try {
              LOG.debug("Trying to load jdbc driver " + jdbcDriver);
              Class.forName(jdbcDriver);
              LOG.info("Successfully loaded jdbc driver");
          } catch (ClassNotFoundException e) {
              LOG.error("Could not load jdbc driver with name " + jdbcDriver);
              throw e;
          }
          // get connection
          try {
              LOG.debug("Connecting to extractor " + connectionString);
              final Connection conn = DriverManager.getConnection(connectionString, username, password);
              LOG.info("Successfully connected to extractor");
              return conn;
          } catch (SQLException e) {
              LOG.error("Could not connect to extractor", e);
              throw e;
          }
      }
docs: Loads the JDBC driver specified in {@code jdbcDriver} and establishes a JBDC connection with the given {@code connectionString}, {@code username} and
  {@code password}.
  
  @param jdbcDriver       The fully-qualified class name of the JDBC driver
  @param connectionString The JDBC connection string
  @param username         The extractor username
  @param password         The extractor password
  @return The established JDBc connection
  @throws ClassNotFoundException Gets thrown when loading the driver fails
  @throws SQLException           Gets thrown when connection to the extractor fails