### Question:
DefaultPromise implements Promise<V> { @Override public Throwable getThrowable() { return exception; } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Override boolean set(final V value); @Override boolean setFailure(final Throwable cause); @Override void addListener(final PromiseListener<V> listener); @Override Throwable getThrowable();  }### Answer:
@Test public void getThrowable() throws Exception { assertThat(promise.getThrowable()).isNull(); Throwable exception = new OMSRuntimeException("-1", "Test Error"); promise.setFailure(exception); assertThat(promise.getThrowable()).isEqualTo(exception); }