### Question:
SettableClientFuture extends DelegatingClientFuture<V> { public void setError(Throwable error) { setResult(Results.<V>fromError(error)); } SettableClientFuture(); protected  SettableClientFuture(Executor executor); private  SettableClientFuture(SettableFuture<Result<V>> delegate); private  SettableClientFuture(SettableFuture<Result<V>> delegate, Executor executor); void setValue(V value); void setError(Throwable error); void setResult(Result<V> result);  }### Answer:
@Test public void testValueErrored() throws Exception { RuntimeException e = new RuntimeException("error"); SettableClientFuture<Boolean> future = new SettableClientFuture<>(); future.setError(e); assertFalse(future.isCancelled()); assertTrue(future.isDone()); assertTrue(future.isError()); try { assertTrue(future.get(0, TimeUnit.MILLISECONDS)); } catch(ExecutionException ee) { assertEquals(e, ee.getCause()); } assertEquals(Results.<Boolean>fromError(e), future.getResult()); }