### Question:
SshEffectorTasks { public static SshEffectorTaskFactory<?> requirePidRunning(Integer pid) { return codePidRunning(pid).summary("PID "+pid+" is-running check (required)").requiringExitCodeZero("Process with PID "+pid+" is required to be running"); }  static SshEffectorTaskFactory<Integer> ssh(SshMachineLocation machine, String ...commands); static SshEffectorTaskFactory<Integer> ssh(String ...commands); static SshEffectorTaskFactory<Integer> ssh(List<String> commands); static SshPutTaskFactory put(String remoteFile); static SshFetchEffectorTaskFactory fetch(String remoteFile); static SshEffectorTaskFactory<Integer> codePidRunning(Integer pid); static SshEffectorTaskFactory<?> requirePidRunning(Integer pid); static SshEffectorTaskFactory<Boolean> isPidRunning(Integer pid); static SshEffectorTaskFactory<Integer> codePidFromFileRunning(final String pidFile); static SshEffectorTaskFactory<?> requirePidFromFileRunning(String pidFile); static SshEffectorTaskFactory<Boolean> isPidFromFileRunning(String pidFile); @Beta static Map<String, Object> getSshFlags(Entity entity, Location optionalLocation); static final ConfigKey<Boolean> IGNORE_ENTITY_SSH_FLAGS; }### Answer:
@Test(groups="Integration") public void testNonRunningPidRequired() { ProcessTaskWrapper<?> t = submit(SshEffectorTasks.requirePidRunning(99999)); setExpectingFailure(); try { t.getTask().getUnchecked(); } catch (Exception e) { log.info("The error if required PID is not found is: "+e); clearExpectedFailure(); Assert.assertTrue(e.toString().contains("Process with PID"), "Expected nice clue in error but got: "+e); } checkExpectedFailure(); }