@Test public void testConsumeSync(){ FutureWithTrigger<AtomicBoolean> futureWithTrigger = new FutureWithTrigger<>(); futureWithTrigger.getFuture().consume(b->b.set(true)); AtomicBoolean test = new AtomicBoolean(false); Triggerer.triggerValue(test, futureWithTrigger); assertTrue(test.get()); }
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();  }