@Test public void testMapAsync() throws Exception { FutureWithTrigger<Integer> futureWithTrigger = new FutureWithTrigger<>(); int test = 1; Triggerer.triggerValueAsync(10, test, futureWithTrigger); int result = futureWithTrigger.getFuture().map(i->i+1).await(); assertEquals(test + 1, result); }
public Future<T> getFuture(){ return this.future; }
FutureWithTrigger { public Future<T> getFuture(){ return this.future; } }
FutureWithTrigger { public Future<T> getFuture(){ return this.future; } FutureWithTrigger(); }
FutureWithTrigger { public Future<T> getFuture(){ return this.future; } FutureWithTrigger(); Callback<T> getTrigger(); Future<T> getFuture(); }
FutureWithTrigger { public Future<T> getFuture(){ return this.future; } FutureWithTrigger(); Callback<T> getTrigger(); Future<T> getFuture();  }