public void useLocatorPort(int locatorPort) {
    repository.setJmxUseLocator(true);
    repository.setPort(locatorPort + "");
  }
This is used to test embedded pulse. If your test needs to check pulse's repository object for
assertions, use this rules to properly initialize and cleanup the repository
geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/test/junit/rules/EmbeddedPulseRule.java