LazyDOMRpcResultFuture extends AbstractFuture<DOMRpcResult> implements BindingRpcFutureAware { @Override public DOMRpcResult get() throws InterruptedException, ExecutionException { if (result != null) { return result; } try { return transformIfNecessary(bindingFuture.get()); } catch (ExecutionException e) { throw new ExecutionException(e.getMessage(), DOM_RPC_EX_MAPPER.apply(e)); } } private  LazyDOMRpcResultFuture(final ListenableFuture<RpcResult<?>> delegate,
            final BindingNormalizedNodeSerializer codec); @Override ListenableFuture<RpcResult<?>> getBindingFuture(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override void addListener(final Runnable listener, final Executor executor); @Override DOMRpcResult get(); @Override DOMRpcResult get(final long timeout, final TimeUnit unit); @Override boolean isCancelled(); @Override boolean isDone();  }
@SuppressWarnings({"checkstyle:IllegalThrows", "checkstyle:IllegalCatch", "checkstyle:avoidHidingCauseException"}) @Test(expected = InterruptedException.class) public void checkedGetWithException() throws Throwable { doThrow(InterruptedException.class).when(future).get(); try { lazyDOMRpcResultFuture.get(); } catch (RuntimeException e) { throw e.getCause(); } }
@SuppressWarnings({"checkstyle:IllegalThrows", "checkstyle:IllegalCatch", "checkstyle:avoidHidingCauseException"}) @Test(expected = InterruptedException.class) public void checkedGetWithException2() throws Throwable { doThrow(InterruptedException.class).when(future).get(1, TimeUnit.SECONDS); try { lazyDOMRpcResultFuture.get(1, TimeUnit.SECONDS); } catch (RuntimeException e) { throw e.getCause(); } }