public void testStartAndStopProcess() throws Exception { final String testName = "testStartAndStopProcess"; execAndValidate(new String[] { ""+this.registryPort, testName }, TEST_CASE + " process running"); final File pidFile = new File(TEST_CASE + File.separator + testName + ".pid"); final ObjectName objectName = ObjectName.getInstance( TEST_CASE + ":testName=" + testName); final String pidAttribute = "Pid"; final String method = "stop"; final LocalProcessController stopper = new LocalProcessController(pidFile); stopper.connect(); assertTrue(stopper.checkPidMatches()); stopper.disconnect(); stopper.stop(objectName, pidAttribute, method, new String[] {"Process"}, new Object[]{Boolean.TRUE}); }