@Test public void getStatusMuleEERunningTest() throws Exception { doReturn(StringUtils.EMPTY).when(controllerSpy, EXECUTE_CMD_METHOD_NAME, DISPLAY_MULE_PROCESS_INFORMATION); doReturn("RUNNING PID : 1").when(controllerSpy, EXECUTE_CMD_METHOD_NAME, DISPLAY_MULE_EE_PROCESS_INFORMATION); assertThat("Status is not the expected", controllerSpy.status(StringUtils.EMPTY), equalTo(RUNNING_STATUS)); }
@Override public int status(String... args) { String muleResult = executeCmd("sc queryex \"mule\" "); String muleEEResult = executeCmd("sc queryex \"mule_ee\" "); Boolean result = muleResult.contains("RUNNING") || muleEEResult.contains("RUNNING"); return result ? 0 : 1; }
WindowsController extends AbstractOSController { @Override public int status(String... args) { String muleResult = executeCmd("sc queryex \"mule\" "); String muleEEResult = executeCmd("sc queryex \"mule_ee\" "); Boolean result = muleResult.contains("RUNNING") || muleEEResult.contains("RUNNING"); return result ? 0 : 1; } }
WindowsController extends AbstractOSController { @Override public int status(String... args) { String muleResult = executeCmd("sc queryex \"mule\" "); String muleEEResult = executeCmd("sc queryex \"mule_ee\" "); Boolean result = muleResult.contains("RUNNING") || muleEEResult.contains("RUNNING"); return result ? 0 : 1; } WindowsController(String muleHome, int timeout); }
WindowsController extends AbstractOSController { @Override public int status(String... args) { String muleResult = executeCmd("sc queryex \"mule\" "); String muleEEResult = executeCmd("sc queryex \"mule_ee\" "); Boolean result = muleResult.contains("RUNNING") || muleEEResult.contains("RUNNING"); return result ? 0 : 1; } WindowsController(String muleHome, int timeout); @Override String getMuleBin(); @Override void start(String... args); @Override int stop(String... args); @Override int getProcessId(); @Override int status(String... args); @Override void restart(String... args); }
WindowsController extends AbstractOSController { @Override public int status(String... args) { String muleResult = executeCmd("sc queryex \"mule\" "); String muleEEResult = executeCmd("sc queryex \"mule_ee\" "); Boolean result = muleResult.contains("RUNNING") || muleEEResult.contains("RUNNING"); return result ? 0 : 1; } WindowsController(String muleHome, int timeout); @Override String getMuleBin(); @Override void start(String... args); @Override int stop(String... args); @Override int getProcessId(); @Override int status(String... args); @Override void restart(String... args);  }