@Test public void nonExistentBinaryThrowsExceptionOnInfiniteWait() throws Exception { ListeningProcessExecutor executor = new ListeningProcessExecutor(); CapturingListener listener = new CapturingListener(); ListeningProcessExecutor.LaunchedProcess process = executor.launchProcess( ProcessExecutorParams.ofCommand("this-better-not-be-a-process-on-your-system-for-real"), listener); exception.expect(IOException.class); exception.expectMessage( "Failed to start process [this-better-not-be-a-process-on-your-system-for-real]"); executor.waitForProcess(process); }