@Test
  public void statusWithPidReturnsOnlineWithDetails() throws Exception {
    givenRunningLocator();

    LocatorState locatorState = new Builder()
        .setPid(localPid)
        .build()
        .status();

    assertThat(locatorState.getStatus()).isEqualTo(ONLINE);
    assertThat(locatorState.getClasspath()).isEqualTo(getClassPath());
    assertThat(locatorState.getGemFireVersion()).isEqualTo(GemFireVersion.getGemFireVersion());
    assertThat(locatorState.getHost()).isEqualTo(getLocalHost().getCanonicalHostName());
    assertThat(locatorState.getJavaVersion()).isEqualTo(System.getProperty("java.version"));
    assertThat(locatorState.getJvmArguments()).isEqualTo(getJvmArguments());
    assertThat(locatorState.getLogFile()).isEqualTo(getLogFilePath());
    assertThat(locatorState.getMemberName()).isEqualTo(getUniqueName());
    assertThat(locatorState.getPid().intValue()).isEqualTo(localPid);
    assertThat(locatorState.getUptime()).isGreaterThan(0);
    assertThat(locatorState.getWorkingDirectory()).isEqualTo(new File(".").getCanonicalPath());
  }
Integration tests for using {@link LocatorLauncher} as an in-process API within an existing JVM.

@since GemFire 8.0
geode-core/src/integrationTest/java/org/apache/geode/distributed/LocatorLauncherLocalIntegrationTest.java