code: public static Connection createSpatialDataBase(String dbName,boolean initSpatial, String h2Parameters )throws SQLException, ClassNotFoundException {
          String databasePath = initDBFile(dbName, h2Parameters);
          org.h2.Driver.load();
          // Keep a connection alive to not close the DataBase on each unit test
          Connection connection = DriverManager.getConnection(databasePath,
                  "sa", "sa");
          // Init spatial ext
          if(initSpatial) {
              H2GISFunctions.load(connection);
          }
          return connection;
      }
docs: Create a spatial database
  @param dbName filename
  @param initSpatial If true add spatial features to the database
  @param h2Parameters Additional h2 parameters
  @return Connection
  @throws java.sql.SQLException
  @throws java.lang.ClassNotFoundException