properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
properties.put("openjpa.MetaDataFactory", "jpa(Types=" + JPADomain.class.getName() +")");
factory = OpenJPAPersistence.getEntityManagerFactory(properties);
// Initialize the JPADomainList (no autodetect,...).
jpaDomainList = new JPADomainList();
jpaDomainList.setLog(new SimpleLog("JPADomainListMockLog"));
jpaDomainList.setDNSService(setUpDNSServer("localhost"));
jpaDomainList.setAutoDetect(false);
jpaDomainList.setAutoDetectIP(false);
jpaDomainList.setEntityManagerFactory(factory);