@Test
public void exceptionIsThrownOnUnwrap() throws Exception {

    final UnsupportedOperationException testedException = new UnsupportedOperationException("Test exception!");
    Callable<Boolean> task = new Callable<Boolean>() {
        @Override
        public Boolean call() throws Exception {
            throw testedException;
        }
    };
    Future<AsyncResult<Boolean>> resultFuture = AsyncRunner.submit(null, task);
    AsyncResult<Boolean> result = resultFuture.get();
    exception.expect(AsyncExecutionException.class);
    result.unwrap();
}