aeshell/aesh — pull request #53 by aslakknutsen (2014-03-19 12:27:01+00:00)
Title: Add CountDownLatch and Exceptions List to feed information back to main ...

...thread

TestConsoleCallback function as a base class for ConsoleCallback in tests
that takes a CountDownLatch and List.

The TestConsoleCallback expose a verify method that can be used as a
replacement for execute in ConsoleCallback to verify the execution.

The TestConsoleCallback takes care of adding caught exceptions to the
exception list and call the CountDownLatch when done.

Waiting for the CoundDownLatch and re throw of Exceptions caught in the
TestConsoleCallback needs to be done in the Main thread executing the test
method so the errors are reported back to JUnit.

All uses of ConsoleCallback in test cases should be replaced with the same construct. Might want to add some Base Class or ConsoleSetup/Verify Helper or similar to avoid to much repeated code.

Change pom.xml to see errors in console:
```diff
diff --git a/pom.xml b/pom.xml
index fa1fa64..ece4af0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,9 +59,6 @@

maven-surefire-plugin

- true
- false
- true

**/*TestCase.java
**/*Test.java
`` `