// We need to add the listener to the context before we start. this test
// class has been amended to implement the chain listener because the
// invocation of the fireEvent method uses ClosureUtils from Apache
// Commons and an in-line listener method is not accessible at run time.
context.addListener(this);
try {
context.setSource(new InputStreamReader(inStream, "UTF-8"));
final long t = System.currentTimeMillis();