@Test
public void shouldLogOnErrorForEachExceptions() {

   AssertionLoggerHandler.startCapture();
   try {
      final CountingIOCallback countingIOCallback = new CountingIOCallback(true);
      final DelegateCallback callback = new DelegateCallback(Collections.singleton(countingIOCallback));
      callback.onError(0, "not a real error");
      Assert.assertTrue(AssertionLoggerHandler.findText("AMQ142025"));
   } finally {
      AssertionLoggerHandler.stopCapture();
   }
}