class ConfigurationRegistry {

    public Configuration getConfiguration(final PersistenceUnitDescriptor descriptor) {
        for (final ConfigurationFactory factory : CONFIG_FACTORIES) {
            if (factory.isSupported(descriptor)) {
                return factory.createConfiguration(descriptor);
            }
        }
        throw new JpaUnitException("Unsupported JPA provider");
    }

}