private Throwable buildTimeoutException( Thread thread ) { StackTraceElement[] stackTrace = thread.getStackTrace(); TestTimedOutException timedOutException = new TestTimedOutException( timeout, timeUnit ); timedOutException.setStackTrace( stackTrace ); return timedOutException; }