### Question:
BlockingResponseHandler implements ResponseHandler<T> { public T getResult() { try { countDownLatch.await(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } return result; } BlockingResponseHandler(ObjectReader objectReader, Function<Exception, T> errorResponseTemplate); @Override final void completed(T result); @Override final void failed(Exception exception); @Override T deserializeResponse(InputStream inputStream); T getResult();  }### Answer:
@Test public void canBeInterrupted() { final BlockingResponseHandler<Response> handler = new BlockingResponseHandler<>( mock(ObjectReader.class), ex -> null); Thread thread = new Thread(() -> handler.getResult()); thread.start(); thread.interrupt(); assertTrue(thread.isInterrupted()); }