public T withHttpService(boolean useDefaultPort) {
    properties.setProperty(HTTP_SERVICE_BIND_ADDRESS, "localhost");
    if (!useDefaultPort) {
      properties.put(HTTP_SERVICE_PORT, availableHttpPort + "");
      httpPort = Integer.parseInt(properties.getProperty(HTTP_SERVICE_PORT));
    } else {
      // indicate start http service but with default port
      // (different from Gemfire properties, 0 means do not start http service)
      httpPort = 0;
    }
    return (T) this;
  }
the abstract class that's used by LocatorStarterRule and ServerStarterRule to avoid code
duplication.

The rule will try to clean up the working dir as best as it can. Any first level children
created in the test will be cleaned up after the test.
geode-dunit/src/main/java/org/apache/geode/test/junit/rules/MemberStarterRule.java