private PersonRepository createRepository(Function<GeodeSetup.Builder, GeodeSetup.Builder> fn) {
    RegionResolver resolver = new LocalResolver(RegionResolver.defaultResolver(cache));
    GeodeSetup.Builder setup = fn.apply(GeodeSetup.builder().regionResolver(resolver));
    AutocreateRegion autocreate = new AutocreateRegion(cache);
    Backend backend = WithSessionCallback.wrap(new GeodeBackend(setup.build()), autocreate);
    return new PersonRepository(backend);
  }
Create repository using lambda for customization
criteria/geode/test/org/immutables/criteria/geode/GetAllOptimizationTest.java