@Test public void stopSuccessfullyReturnZeroTest() throws Exception { int runSyncRemoveSuccessReturnValue = 0; doReturn(runSyncRemoveSuccessReturnValue).when(controllerSpy, "runSync", "remove"); assertThat("The return value is not the expected", controllerSpy.stop(CONTROLLER_ARGUMENTS), equalTo(RUN_SYNC_STOP_RETURN_VALUE)); }
@Override public int stop(String... args) { final int returnCode = super.stop(args); int errorRemove = runSync("remove"); if (errorRemove != 0 && errorRemove != 0x424) { throw new MuleControllerException("The mule instance couldn't be removed as a service"); } return returnCode; }
WindowsController extends AbstractOSController { @Override public int stop(String... args) { final int returnCode = super.stop(args); int errorRemove = runSync("remove"); if (errorRemove != 0 && errorRemove != 0x424) { throw new MuleControllerException("The mule instance couldn't be removed as a service"); } return returnCode; } }
WindowsController extends AbstractOSController { @Override public int stop(String... args) { final int returnCode = super.stop(args); int errorRemove = runSync("remove"); if (errorRemove != 0 && errorRemove != 0x424) { throw new MuleControllerException("The mule instance couldn't be removed as a service"); } return returnCode; } WindowsController(String muleHome, int timeout); }
WindowsController extends AbstractOSController { @Override public int stop(String... args) { final int returnCode = super.stop(args); int errorRemove = runSync("remove"); if (errorRemove != 0 && errorRemove != 0x424) { throw new MuleControllerException("The mule instance couldn't be removed as a service"); } return returnCode; } 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 stop(String... args) { final int returnCode = super.stop(args); int errorRemove = runSync("remove"); if (errorRemove != 0 && errorRemove != 0x424) { throw new MuleControllerException("The mule instance couldn't be removed as a service"); } return returnCode; } 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);  }