assertFalse("Send shouldn't have completed", md2.isDone());
assertTrue("Complete the first request", producer.completeNext());
assertFalse("Requst should be successful", isError(md1));
assertFalse("Second request still incomplete", md2.isDone());
IllegalArgumentException e = new IllegalArgumentException("blah");
assertTrue("Complete the second request with an error", producer.errorNext(e));
try {
md2.get();
fail("Expected error to be thrown");
} catch (ExecutionException err) {
assertEquals(e, err.getCause());