@Test
public void testSetenv() throws Throwable {

  String var = "TEST_RUN";
  String val = "TEST-RUN-ENV-VALUE";
  initProcess(commandFactory.env());
  process.setEnv(var, val);
  process.start();
  //in-thread wait
  process.run();
  //here stopped
  assertTrue("process stop callback not received", stopped);
  assertEquals(0, process.getExitCode().intValue());
  assertStringInOutput(val, getFinalOutput());
}