AdvancedExternalizer<?> rowKeyExternalizer = RowKeyExternalizer.INSTANCE;
AdvancedExternalizer<?> entityKeyMetadataExternalizer = EntityKeyMetadataExternalizer.INSTANCE;
AdvancedExternalizer<?> idGeneratorKeyExternalizer = IdSourceKeyExternalizer.INSTANCE;
// override global configuration from the config file to inject externalizers
GlobalConfiguration globalConfiguration = new GlobalConfigurationBuilder()
.read( tmpCacheManager.getCacheManagerConfiguration() )
.serialization()
.addAdvancedExternalizer( entityKeyExternalizer.getId(), entityKeyExternalizer )
.addAdvancedExternalizer( associationKeyExternalizer.getId(), associationKeyExternalizer )
.addAdvancedExternalizer( rowKeyExternalizer.getId(), rowKeyExternalizer )