### Question:
TomcatEngineController implements EngineController { public void halt() throws SigarException { long serverPid = processManager.getPidFromProcQuery(ptql); if (serverPid != -1) { processManager.forceKill(serverPid); } } @Autowired  TomcatEngineController(ProcessManager processManager,
                                  @Value("#{ systemProperties['engine.home'] }") String engineHome,
                                  @Value("#{ systemProperties['server.home'] }") String serverHome); int start(List<String> javaOpts); boolean stop(); void halt(); boolean isEngineRunning();  }### Answer:
@Test public void testHalt() throws SigarException { EasyMock.expect( processManager.getPidFromProcQuery("State.Name.sw=java,Args.*.eq=-Dcatalina.base=" + catalinaBase)).andReturn(123l); processManager.forceKill(123l); replay(); tomcatEngineController.halt(); verify(); }