@Override
  public void before() {
    super.before();
    if (autoStart) {
      startServer();
      regions.forEach((regionName, regionType) -> {
        RegionFactory rf = getCache().createRegionFactory(regionType);
        rf.create(regionName);
      });
    }
  }
This is a rule to start up a server in your current VM. It's useful for your Integration Tests.

<p>
This rules allows you to create/start a server using any @ConfigurationProperties, you can chain
the configuration of the rule like this: ServerStarterRule server = new ServerStarterRule()
.withProperty(key, value) .withName(name) .withProperties(properties) .withSecurityManager(class)
.withJmxManager() .withRestService() .withEmbeddedLocator() .withRegion(type, name) etc, etc. If
your rule calls withAutoStart(), the cache and server will be started before your test code.

<p>
In your test code, you can use the rule to access the server's attributes, like the port
information, working dir, name, and the cache and cacheServer it creates.

<p>
If you need a rule to start a server/locator in different VMs for Distributed tests, You should
use {@code ClusterStartupRule}.
geode-dunit/src/main/java/org/apache/geode/test/junit/rules/ServerStarterRule.java