EndpointPromiseImpl implements EndpointPromise { @Override public boolean isComplete() { return complete.get(); } EndpointPromiseImpl(Component component); @Override boolean isComplete(); @Override void setSuccess(Endpoint endpoint); @Override void setWait(long delay); @Override void setFailure(Exception exception);  }
@Test public void endpointNotDone() { MockComponent component = new MockComponent(); EndpointPromise promise = new EndpointPromiseImpl(component); assertFalse("future should not have been marked done", promise.isComplete()); assertTrue("component should not have been notified of any messages", component.messages.isEmpty()); }