ProducerFailedException extends CancelTaskException { public String getCauseAsString() { return causeAsString; } ProducerFailedException(Throwable cause); String getCauseAsString();  }
@Test public void testCauseIsStringified() throws Exception { ProducerFailedException e = new ProducerFailedException(new Exception()); assertNull(e.getCause()); assertNotNull(e.getCauseAsString()); }