private Deadline(long timeoutMs) {
    this.timeoutNanos = timeoutMs * 1000000L;
  }
@Test
  public void testDeadline() throws Exception {
    isFailed = false;
    errorMsg = "";

    Thread threadTimeout = new Thread(createRunnable());
    threadTimeout.setDaemon(true);
    threadTimeout.start();
    threadTimeout.join(60000);

    if (isFailed) {
      Assert.fail(errorMsg);
    }
  }