### Question:
Hibernate4MemcachedRegionFactory implements RegionFactory { HibernateCacheTimestamper populateTimestamper(Settings settings, OverridableReadOnlyProperties properties) { String timestamperClazzName = properties.getProperty(TIMESTAMPER_PROPERTY_KEY, DEFAULT_TIMESTAMPER_CLASS.getName()); HibernateCacheTimestamper timestamper; try { Class<?> clazz = Class.forName(timestamperClazzName); timestamper = (HibernateCacheTimestamper) clazz.newInstance(); } catch (Exception e) { throw new IllegalStateException(e.getMessage(), e); } timestamper.setSettings(settings); timestamper.setProperties(properties); timestamper.setMemcachedAdapter(memcachedAdapter); timestamper.init(); return timestamper; } Hibernate4MemcachedRegionFactory();  Hibernate4MemcachedRegionFactory(Properties properties); @Override void start(Settings settings, Properties properties); @Override void stop(); @Override boolean isMinimalPutsEnabledByDefault(); @Override AccessType getDefaultAccessType(); @Override long nextTimestamp(); @Override EntityRegion buildEntityRegion(String regionName, Properties properties,
                                          CacheDataDescription metadata); @Override NaturalIdRegion buildNaturalIdRegion(String regionName, Properties properties,
                                                CacheDataDescription metadata); @Override CollectionRegion buildCollectionRegion(String regionName, Properties properties,
                                                  CacheDataDescription metadata); @Override QueryResultsRegion buildQueryResultsRegion(String regionName, Properties properties); @Override TimestampsRegion buildTimestampsRegion(String regionName, Properties properties); static final int MEMCACHED_MAX_EPIRY_SECONDS; static final AccessType DEFAULT_ACCESS_TYPE; static final String REGION_EXPIRY_SECONDS_PROPERTY_KEY_PREFIX; static final String MEMCACHED_ADAPTER_CLASS_PROPERTY_KEY; static final String TIMESTAMPER_PROPERTY_KEY; static final Class<?> DEFAULT_TIMESTAMPER_CLASS; }### Answer:
@Test public void populateTimestamper_default() throws Exception { Properties properties = new Properties(); Settings settings = new TestingSettingsBuilder().build(); HibernateCacheTimestamper timestamper = regionFactory.populateTimestamper(settings, new OverridableReadOnlyPropertiesImpl(properties)); assertThat(timestamper).isExactlyInstanceOf(Hibernate4MemcachedRegionFactory.DEFAULT_TIMESTAMPER_CLASS); }
@Test public void populateTimestamper() throws Exception { Properties properties = new Properties(); properties.setProperty(Hibernate4MemcachedRegionFactory.TIMESTAMPER_PROPERTY_KEY, FakeHibernateCacheTimestamper.class.getName()); Settings settings = new TestingSettingsBuilder().build(); HibernateCacheTimestamper timestamper = regionFactory.populateTimestamper(settings, new OverridableReadOnlyPropertiesImpl(properties)); assertThat(timestamper).isExactlyInstanceOf(FakeHibernateCacheTimestamper.class); assertThat(((FakeHibernateCacheTimestamper) timestamper).isInitCalled()).isTrue(); }