private static void runAgent(final String processOutputPattern, final String... args)
      throws Exception {
    final ProcessWrapper agentProcess =
        new ProcessWrapper.Builder().mainClass(AgentLauncher.class).mainArguments(args).build();

    agentProcess.execute();

    if (processOutputPattern != null) {
      agentProcess.waitForOutputToMatch(processOutputPattern);
    }
    assertThat(agentProcess.waitFor(TIMEOUT)).as("Expecting process started with:" + lineSeparator()
        + " " + Arrays.asList(args) + lineSeparator() + "with output:" + lineSeparator() + " "
        + agentProcess.getOutput(true) + lineSeparator() + "to terminate with exit code: 0"
        + lineSeparator() + "but waitFor is still waiting after timeout: " + TIMEOUT + " seconds.")
        .isEqualTo(0);
  }
Test to verify fix for TRAC #44658.
<p>

TRAC #44658: Agent ignores 'property-file' command line option (regression in 6.6.2)
geode-core/src/integrationTest/java/org/apache/geode/admin/jmx/internal/DeprecatedAgentLauncherIntegrationTest.java