assertEquals("onMessage should have been called", 1, _receivedCount);
assertEquals("onException should NOT have been called", 0, _errorCount);
// Check that Error has been written to the application log.
LogMonitor _monitor = new LogMonitor(_outputFile);
assertTrue("The expected message not written to log file.",
_monitor.waitForMessage(javaLangErrorMessageText, LOGMONITOR_TIMEOUT));
if (_clientConnection != null)
{
try
{