### Question:
ClientCallback implements Future<Object[]> { public Object[] get() throws InterruptedException, ExecutionException { try { return delegate.get(); } catch (final CancellationException ex) { throw new InterruptedException("Operation has been cancelled"); } } ClientCallback(); void start(Message msg); void handleResponse(Map<String, Object> ctx, Object[] res); void handleException(Map<String, Object> ctx, Throwable ex); boolean cancel(boolean mayInterruptIfRunning); Map<String, Object> getResponseContext(); Object[] get(); Object[] get(long timeout, TimeUnit unit); boolean isCancelled(); boolean isDone();  }### Answer:
@Test(expected = TimeoutException.class) public void testTimeout() throws Exception { callback.get(10, TimeUnit.MILLISECONDS); }