private static Module getTestPersistModule() {
    AmbariJpaPersistModule persistModule = new AmbariJpaPersistModule("ambari-server");
    Configuration testConfiguration = new Configuration(getTestProperties());
    Properties persistenceProperties = ControllerModule.getPersistenceProperties(testConfiguration);

    // overriding JPA properties with test specific values
    persistenceProperties.setProperty(PersistenceUnitProperties.SCHEMA_GENERATION_DATABASE_ACTION, PersistenceUnitProperties.NONE);

    // this doesn't work for something similar to what's described here: http://stackoverflow.com/questions/3606825/problems-with-generating-sql-via-eclipselink-missing-separator
    // line breaks are not supported; SQL statements need to be in one line! - appears to be fixed in eclipselink 2.6
    //persistenceProperties.setProperty(PersistenceUnitProperties.SCHEMA_GENERATION_CREATE_SCRIPT_SOURCE, "Ambari-DDL-Postgres-CREATE.sql");

    // Let the initialization be performed by the jPA provider!
    //persistenceProperties.setProperty(PersistenceUnitProperties.SCHEMA_GENERATION_SQL_LOAD_SCRIPT_SOURCE, getTestDataDDL());

    //persistenceProperties.setProperty(PersistenceUnitProperties.SCHEMA_GENERATION_DROP_SOURCE, PersistenceUnitProperties.SCHEMA_GENERATION_METADATA_SOURCE);
    persistenceProperties.setProperty(PersistenceUnitProperties.THROW_EXCEPTIONS, "true");

    // todo remove these when switching to derby!
    persistenceProperties.setProperty(PersistenceUnitProperties.JDBC_USER, "ambari");
    persistenceProperties.setProperty(PersistenceUnitProperties.JDBC_PASSWORD, "bigdata");

    return persistModule.properties(persistenceProperties);
  }
Functional test for the Cleanup process.
ambari-server/src/test/java/org/apache/ambari/server/cleanup/CleanupServiceFunctionalTest.java