TraceEventErrorsListener
A JUnit RunListener that catches TraceEvent errors during test execution. And reports these errors to Instrumentation. A test will fail at the end when one or more error events were caught during that test. The error events will be shown in JUnit reports. Any error events that were caught will be cleared before the next test is started.
Error events may be whitelisted from within a test when this error is expected. This can be done by using one of the expect methods.