- public RpcResult<TransactionStatus> get(long timeout, TimeUnit unit) throws InterruptedException,
- ExecutionException, TimeoutException {
- return null;
+ public RpcResult<T> get(final long timeout, final TimeUnit unit) throws InterruptedException,
+ ExecutionException, TimeoutException {
+ return result;
+ }
+
+ public static class Builder<T> {
+
+ private boolean cancel;
+ private boolean isCancelled;
+ private boolean isDone;
+ private RpcResult<T> result;
+
+ public Builder<T> cancel(final boolean cancel) {
+ this.cancel = cancel;
+ return this;
+ }
+
+ public Builder<T> isCancelled(final boolean isCancelled) {
+ this.isCancelled = isCancelled;
+ return this;
+ }
+
+ public Builder<T> isDone(final boolean isDone) {
+ this.isDone = isDone;
+ return this;
+ }
+
+ public Builder<T> rpcResult(final RpcResult<T> result) {
+ this.result = result;
+ return this;
+ }
+
+ public Future<RpcResult<T>> build() {
+ return new DummyFuture<T>(this);
+ }