@Test(groups="checkintest") public void testDoneWithInvalidResponse() { try { notifyInvalidResponse(90, pendingResponse); pendingResponse.waitDone(); fail("Should throw InvalidResponseException"); } catch (ResponseTimeoutException e) { fail("Should throw InvalidResponseException"); } catch (InvalidResponseException e) { } }
public void doneWithInvalidResponse(InvalidResponseException e) { lock.lock(); try { illegalResponseException = e; condition.signal(); } finally { lock.unlock(); } }
PendingResponse { public void doneWithInvalidResponse(InvalidResponseException e) { lock.lock(); try { illegalResponseException = e; condition.signal(); } finally { lock.unlock(); } } }
PendingResponse { public void doneWithInvalidResponse(InvalidResponseException e) { lock.lock(); try { illegalResponseException = e; condition.signal(); } finally { lock.unlock(); } } PendingResponse(long timeout); }
PendingResponse { public void doneWithInvalidResponse(InvalidResponseException e) { lock.lock(); try { illegalResponseException = e; condition.signal(); } finally { lock.unlock(); } } PendingResponse(long timeout); void done(T response); void doneWithInvalidResponse(InvalidResponseException e); T getResponse(); void waitDone(); }
PendingResponse { public void doneWithInvalidResponse(InvalidResponseException e) { lock.lock(); try { illegalResponseException = e; condition.signal(); } finally { lock.unlock(); } } PendingResponse(long timeout); void done(T response); void doneWithInvalidResponse(InvalidResponseException e); T getResponse(); void waitDone();  }