public static void assertProcessExits(final boolean sameValue, final int value, final Process p) throws InterruptedException,
ExecutionException,
TimeoutException
{
ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
Future<Integer> future = executor.submit(new Callable<Integer>()
{
public Integer call() throws Exception
{
p.waitFor();