GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder();
gcb.globalJmxStatistics().allowDuplicateDomains(true);
// Now prepare a cache configuration.
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.transaction().transactionMode(TransactionMode.NON_TRANSACTIONAL);
// Now add them to the object that we are testing.
objectUnderTest.addCustomGlobalConfiguration(gcb);
objectUnderTest.addCustomCacheConfiguration(builder);
objectUnderTest.afterPropertiesSet();