}
((IdentityConfigurationMetaDataImpl) metadata).setIdentityStores(stores);
// Create the default realm
RealmConfigurationMetaDataImpl realm = new RealmConfigurationMetaDataImpl();
realm.setId(getDefaultRealm());
realm.setIdentityMapping("USER");
//realm.setGroupTypeMappings(groupTypeMappings)
realm.setOptions(new HashMap<String, List<String>>());
List<RealmConfigurationMetaData> realms = new ArrayList<RealmConfigurationMetaData>();
realms.add(realm);
((IdentityConfigurationMetaDataImpl) metadata).setRealms(realms);
if (stores.size() > 0) {