@@ -0,0 +1,1608 @@
+package org.realityforge.jeo.geolatte.jpa.eclipselink;%0A%0Aimport java.util.Properties;%0Aimport javax.persistence.EntityManager;%0Aimport javax.persistence.EntityManagerFactory;%0Aimport javax.persistence.Persistence;%0A%0Apublic class DatabaseTestUtil%0A%7B%0A  static Properties initDatabaseProperties()%0A  %7B%0A    final Properties properties = new Properties();%0A    properties.put( %22javax.persistence.jdbc.driver%22, %22org.postgis.DriverWrapperAutoprobe%22 );%0A    final String databaseUrl = %22jdbc:postgresql_autogis://127.0.0.1:5432/geolatte_test%22;%0A    setProperty( properties, %22javax.persistence.jdbc.url%22, %22test.db.url%22, databaseUrl );%0A    setProperty( properties, %22javax.persistence.jdbc.user%22, %22test.db.user%22, %22geolatte%22 );%0A    setProperty( properties, %22javax.persistence.jdbc.password%22, %22test.db.password%22, null );%0A    properties.put( %22eclipselink.session-event-listener%22, GeolatteExtension.class.getName() );%0A    return properties;%0A  %7D%0A%0A  private static void setProperty( final Properties properties,%0A                                   final String key,%0A                                   final String systemPropertyKey, final String defaultValue )%0A  %7B%0A    final String value = System.getProperty( systemPropertyKey, defaultValue );%0A    if ( null != value )%0A    %7B%0A      properties.put( key, value );%0A    %7D%0A  %7D%0A%0A  public static EntityManager createEntityManager( final String persistenceUnitName )%0A  %7B%0A    final Properties properties = initDatabaseProperties();%0A    final EntityManagerFactory factory = Persistence.createEntityManagerFactory( persistenceUnitName, properties );%0A    return factory.createEntityManager();%0A  %7D%0A%7D%0A

Add utility for testing database